Cheat Database Converter : MAME 37B16 -> RAINE 0.32a
Coded by JCK from The Ultimate Patchers
Version 4.0B - Release date : 19th of July 2001


1. Archive contents

  - MAMERAIN.C   : Source file (C code)
  - MAMERAIN.EXE : Binary file (DOS and Win users only)
  - MAMERAIN.TXT : This file ;)


2. Licence

This program is a FREEWARE, with some restrictions :

You are NOT allowed to :
- Charge for providing this program.
- Modify this program or the distribution archive, in ANY way.
  This includes adding/removing files to this archive.
- Distribute it with MAME, RAINE or derived emulators.

You ARE allowed to :
- Include it on any web server.
- Include it with cheat databases, if you also provide the WHOLE distribution
  archive within the database archive.
- Use this program :-)

I am NOT responsible of ANY kind of damages caused directly or indirectly by
MAMERAIN. Use this program AT YOUR OWN RISK.

Bug reports : stephh@europe.com (type MAMERAIN as subject of your mail)


3. Purpose

This program will convert cheats from a selected MAME 37B16 cheat database
into cheats that can be used by RAINE 0.32a .

You can try to convert older MAME cheat databases, but there is no warranty
for doing so !


4. Usage

Typing 'MAMERAIN' at the DOS prompt will give you a short help.

There are 3 arguments that you must fill :

  - <CheatFileIn> is the name of a valid MAME cheat database. You should
    better check it by using CHECKCDB on it first.

  - <CheatFileOut> is the name of a RAINE cheat database. Converted cheats
    will be added at the end of the file (if the file doesn't exist, it will
    be created).

  - <GameName> is the name of the game for which you want to convert the
    cheats. No tests are made to check if the game is currently emulated by
    RAINE ! Note that you must type the short name of the game (8 chars max)

For example, if you type :
  mamerain \mame\cheat_nf.cdb \raine\cheatsup.cfg rastan
the cheats for 'rastan' from the file \mame\cheat_nf.cdb will be added to the
file \raine\cheatsup.cfg under a [rastan:cheats] section.

The MAME cheat database should not be modified, but I suggest you make a
copy of it before running this program.

Be also sure that you have no cheats in the RAINE cheat database before using
this program, because you might encounter some problems when running the
game (your cheat database might be badly altered).

This program can't guess RAINE name according to MAME's one ! It will never
do ! Remember that you can use this program even if you don't have RAINE
and/or MAME !

5. History

  1.0    Private release. Only one output file (CHEATS.CFG) which was
         overwritten each time MAMERAIN was run. Only cheats type 000
         were able to be converted.

  1.1    Public release. Cheats were added at the end of the output file.

  1.2    Private release. Added features :
           - new format of a MAME cheat line was recgonized.
           - cheats type 100 (linked cheat, type 000 otherwise) were also
             able to be converted.

  2.0    Public release. Added features :
           - cheats type 500 (linked cheat, type 000 otherwise) were also
             able to be converted; cheats type 100 were removed.

  3.0    Private release. Added features :
           - added cheats type 001, 020, 021, 040, 041 and the linked cheats
             for them (501, 520, 521, 540 and 541)
           - extra description in a MAME cheat line is stored in the RAINE
             Cheat%2dInfo.

  3.1    Public release. Added features :
           - possibility to update another RAINE cheat database.
           - up to 100 cheats can be converted for each game.

  4.0    Public release. Added features :
           - code rewritten (now compatible with Unix)
           - new output according to the new RAINE cheat database format
             (the old RAINE cheat database format isn't supported anymore)
           - added cheats type 998 ("watches" cheats)
           - up to 256 cheats can be converted for each game.
           - extended "desc" and "info" fields to 255 chars (instead of 30)


6. Missing features/Improvements for a future version

  - Add the cheats to an existing section
  - Allow 16/24/32 bits cheats (this must be done for MAME first)


7. Credits

  - MAME team  : if MAME didn't exist, such a program wouldn't be useful ;)
  - RAINE team : if RAINE didn't exist, such a program wouldn't be useful ;)
  - Mac Lak    : debug, comments and suggestions.
  - Pugsy      : host of our cheat databases and other miscellaneous tools
                   (cheat.retrogames.com)
