
                            MagicEngine v0.9
                    Copyright (c) 1997 David Michel
                    ===============================

                         MagicEngine's Homepage
                      Copyright (c) 1997 Bt Garner
                      ----------------------------
                 http://joyce.eng.yale.edu/~bt/turbo/emu

                     MagicEngine's Spanish Homepage
                     Copyright (c) 1997 Juan Carlos
                     ------------------------------
                        http://milu.fut.es/~bzr/

                     MagicEngine's French Homepage
                  Copyright (c) 1997 Frederic Schmitt
                  -----------------------------------
                 http://www.imaginet.fr/~schmitt/emuls/

                    MagicEngine's Japanese HomePage
                   Copyright (c) 1997  Jun Fukushima
                   ---------------------------------
                       http://www.hucard.com/me/

                    MagicEngine's Benelux HomePage
                   Copyright (c) 1997 J.H. Schulte
                   -------------------------------
                http://www.filiaal.net/magic/index.html


    IMPORTANT
    ---------

    Before we see what's new in this version, I have an important
    thing to tell you. MagicEngine now emulates CD-ROM games, but to do
    that the emulator needs an image of a System Card. Initialy I had
    planned to include an internal emulation of the System Card in
    MagicEngine, but I didn't have enough time to finish it - Actually
    only 50% of the System Card is emulated, so I have recently changed
    the emulator to work with an image of a true System Card. I'm sorry
    for this little inconvenient - I will change that in the next
    version...

    Please note also that MagicEngine works only with true CD-ROMs, it
    doesn't support ROM image of CD-ROMs...

    NOTE: About the System Cards, all versions are supported but only
    ----  the version 3.0 will let you play Super CD-ROM games.


    DISCLAIMER
    ----------

    This program is provided as is. I take no responsibility for any
    damage or consequences directly or indirectly, intentionally or
    unintentionally, which may arise from using this program -
    YOU USE IT AT YOUR OWN RISK!


    Files in this package
    ---------------------

        -CWSDPMI.EXE     20 217 bytes
        -PCE.EXE        218 624 bytes
        -PCE.INI          1 169 bytes
        -PCE.TXT         14 205 bytes
        -README.1ST       2 205 bytes


    What's new!
    -----------

    First hi to everyone! And a big thank you to everyone who wrote
    to me in the past few months, I have certainly received too much
    e-mails, but it was really nice! Thanks for all the compliments
    I have received, and for all those registrations too! :) I hope you
    will enjoy this new version as much as the preceding one, I have
    put a lot of work in it, especially in the CD-ROM emulation...
    Ok enough blahblah, let's see what's new.

    The big enhancement is the CD emulation of course! It's not
    yet complete, but it will let you play perfectly a good number
    of games. I haven't been able to test all the existing CDs, but
    compatibility should be about 80% I think. Normally you shouldn't
    have problems in running your CDs on the PC, I used only MSCDEX
    functions to access the CD so it should be compatible with all
    the CD-ROM drives. The only known problem is with Windows 95,
    for an unknown reason Windows doesn't want to recognize all the
    tracks of certain CDs - It recognizes only the first audio track.
    I can't do anything about that, it's a Windows internal problem,
    and all the other programs have the same problem too, if you try
    to start a CD audio player, it will see only the first track.
    Just to say that it's not a bug in MagicEngine. :) On the other
    hand this doesn't happen at all under DOS... But I repeat it
    happens only with some CDs, it's possible the CDs you have work
    equally well under DOS and Windows...

    Except that the other big change is the HuCard emulation, nearly
    all the games that were not working, like the so much wanted Nectaris
    (Military Madness), work perfectly now. In fact I know only three
    games that still have big problems : Burning Angels, Fighting Run
    and TV Sport Hockey. I don't remember all the games that were not
    working but here's a short list :

        - College Pro Baseball '89 & '90 
        - Darius Plus
        - Davis Cup Tennis
        - Gunboat
        - Jack Niclaus Golf
        - Legendary Axe 1 & 2
        - Metal Stoker
        - Naxat Open Golf
        - Nectaris
        - Populous
        - Power Drift
        - Super Volleyball
        - TV Sports Football
        - USA Pro Basketball
        - Valkyrie
        - Volfiev
            
    Otherwise a few bugs have been corrected too, and some games
    are nicer now, like Afterburner, Bomberman, Power Tennis, Alice
    Dream, Baribari, P-47 and a few other. I have tried to not
    alterate too much the compatibility and normally all the games
    that were working before, work in this version too; the only
    problem I have noticed is with Break In - There's a very small
    error with the cursor sprite. Perhaps one or two other games
    have similar problems too, but I'm sure you will report me all
    the faults!

    Also the sound is a lot nicer in this version, I would be 
    tempted to say it's nearly perfect, but I won't say it, I will
    let you judge by yourself. The stereo is now perfectly emulated,
    and really gives another dimension to the games. Sound card that
    can handle 16bit audio are also supported, it doesn't make
    a big difference but it's noticeable.

    A lot of people have asked me to implement a multi-player mode
    where each player could be configured independently: on the
    keyboard, on a joypad or on a GrIP pad. Ok, now this is
    implemented!! I hope you will like the nice menu we have
    designed for you... So now everything is configurable, you can
    setup up to five players, and three different configurations
    can be defined, this will allows you to define a configuration
    with your favourite settings when you play alone, and one or
    two more for when you invit some friend for a Bomberman
    tournament! :)
    
    That is for the emulation side, there's also some improvements
    on the PC side. The two big new things are the VESA 2.0 support
    and the support for two new sound cards : the UltraSound and
    the SoundScape.

    Well there's surely one or two more things that I have forgotten
    to tell you, but there were so many new things! :) If you want to
    get in touch with me, here are both the addresses you can use :

        e-mail    : dmichel@easynet.fr

        snail-mail: David Michel
                    residence du Parc appt n4
                    86330 Moncontour
                    France


    What machine is required ?
    --------------------------

    You will need at least a Pentium for correct speed, MagicEngine
    has been developed and tested on a P100 with 16MB EDO RAM
    and results are very good on this machine, most of the games
    run at full frame rate but depending on your configuration
    it's possible that there will be some differences. The ideal
    machine is probably a P166 with a good video card. For the
    CD-ROM drive the most important is the access time, recent 12x
    or 16x speeds are perfect but all type of drive will be good,
    even a simple 2x speeds drive. In all cases it will be faster
    than a real PC Engine CD-ROM drive. :) Otherwise the slowest PC
    on which MagicEngine has been tested on, is a DX4 100 with 8MB
    of RAM and a 4x speeds CD-ROM drive. It was slow but everything
    worked perfectly.


    Where can I get games ?
    -----------------------

    Please don't ask me for ROM images, I can't and I won't give you
    any ROMs!

				
    How do I use the emulator ?
    ---------------------------

        PCE [options] rom-image

    Where 'rom-image' is the name of a PC Engine game image.
    The emulator accepts two formats: a raw image or an image with
    a 512 byte header (see below for header format).

    Several options are accepted :

        -1        ~ Change the format of the image. Two formats
                    exist, normal images and splitted images.
                    Usually all files of 384KB (and a few other
                    like the 512KB version of 'Devil's Crush')
                    use the splitted format, so if you have
                    problems with one of those images, try this
                    option
        -cd       ~ Directly start a CD-ROM game
        -sgx      ~ Enable the Supergrafx emulation, but before
                    you ask me, no it doesn't fully work yet! :)
                    I have just made the old Supergrafx emulation
                    optional, and deactivated by default, because
                    some CDs can't work if it's activated
        -us/-usa  ~ Inverse the bit order of the image, you can try
                    this option if a game doesn't seem to work
        -nojoy    ~ Disable the PC joypad
        -nosound  ~ Disable the sound card


    Keyboard Functions
    ------------------

        1) Control Layout :
           ----------------

            F5           ~ Select the default configuration
            F6/F7/F8     ~ Select one of the three user
                           configurations
            Cursor-keys  ~ Direction
            Enter        ~ Run
            Space        ~ Select
            Ctrl         ~ Button II
            Alt          ~ Button I 
            Z            ~ Auto fire II
            X            ~ Auto fire I
            0            ~ Slow motion

            NOTE: Those last control keys are only available when
            ----  the configuration is set to F5.

        2) Frame Rate :
           ------------

            MagicEngine is a pretty fast emulator, but on some old
            486 it's still too slow. To speed up the emulation you
            can control how many frames will be skipped.

            F1  ~ display all frames [1/1]
            F2  ~ skip 1 frame       [1/2]
            F3  ~ skip 2 frames      [1/3]
            F4  ~ skip 4 frames      [1/5]

            NOTE: The F2 mode has a side effect. A lot of games use
            ----  sprite flickering to render special effects. You
                  can't see that in this mode, and even worse, some
                  sprites can completely disappear. In this case it
                  is recommended to try another frame rate.

        3) Sound control :
           ---------------

            F9  ~ enable/disable the sound
            F10 ~ reverb effect
            +   ~ increase volume
            -   ~ decrease volume

        4) Misc controls :
           ---------------

            1      ~ Toggle sprites on/off
            2      ~ Toggle background on/off
            Tab    ~ Magic key that can fix some games. You can try
                     this when a game seems to be frozen (please note
                     that it works only for a few games)
            Esc    ~ Go to the menu
            Pause  ~ Pause the game
            Prtscr ~ Make a snapshot of the current screen
                     (under Windows 95 press shift + prtscr)
            F11    ~ Enable/disable the info screen
            F12    ~ Enable/disable the scanlines video mode

            NOTE: When in pause mode, the 'prtscr' key is active,
            ----  otherwise press 'pause' again or 'esc' to quit
                  this mode.


    The main menu
    -------------

        BOOT CD ~ Select a system card for running a CD-ROM game
        RESET   ~ Completely reset the game. You can also press 'run'
                  and then 'select' to do a reset
        PLAY    ~ Return to the game, same as pressing 'esc' again
        LOAD    ~ This entry is active when a game archive is present
                  in the same directory as PCE.EXE or if MagicEngine
                  can find any ROM (see the 'path' option in the
                  INI file)
        CONFIG  ~ Allow you to completely redefine the configuration
                  of the five players
        HELP    ~ Display nice gfx pages showing the function of all
                  the keys
        ABOUT   ~ The copyright screen
        QUIT    ~ Quit the emulator


    The config menu
    ---------------

        MagicEngine has now a menu to configure the player's controls.
        To edit a player, just select it with 'up' and 'down' and then
        press 'space' to change the settings or 'enter' to select a
        controller (ie. keyboard, joystick, ...). Three configurations
        are available, select them by pressing F6 to F8. About joysticks
        they are auto-calibrated, just move the stick a little and
        MagicEngine will calibrate them automatically.


    The INI file
    ------------

    Normally you won't have to modify this file, but in some situations
    it can be useful.

        frame_rate=[1|2|3|5]
        --------------------
            It's like keys F1 to F4, but it allows you to select your
            preferred frame rate at startup.

        default_config=[0|1|2|3]
        ------------------------
            Select the configuration to use at startup. You can change
            it later by pressing F5 to F8.

        delay=[999999|...]
        ------------------
            Indicate the delay for slow motion (you can use any value).
            It is best to experiment and see which delay is suitable.

        keyboard=[0|1|2]
        ----------------
            Select the type of keyboard :

                0 -> AZERTY
                1 -> QWERTY
                2 -> QWERTZ

        joypad=[0|1|2]
        --------------
            Enable or disable the PC joypad :

                0 -> disable the joypad
                1 -> automatic mode
                2 -> manual mode

            In this version the automatic and manual mode do the same
            thing, they both enable the joypad.

        auto_fire_speed=[1|...|10]
        --------------------------
            Select the speed of the auto fire.

        button_1=[0|1|2|3]
        button_2=[0|1|2|3]
        button_3=[0|1|2|3]
        button_4=[0|1|2|3]
        ------------------
            Determine how the two or four buttons of the PC joypad
            are mapped:

                0 -> button I
                1 -> button II
                2 -> select
                3 -> run

        soft_reset=[y|n]
        ----------------
            In certain games if you press 'run' and then 'select' you
            will reset the PC Engine. This option will prevent this
            to happen. If it's enabled only the 'reset' entry in the
            menu will allow you to do a reset.

        graphic_format=[0|1]
        --------------------
            The snapshots can now be saved in two formats, this option
            will let you choose the one your prefer :

                0 -> PCX
                1 -> BMP

        vesa=[y|n]
        ----------
            If set the emulator will use a VESA video mode, otherwise
            it will use a simple mode-x video mode.

        video_mode=[0|1|2|3]
        --------------------
            Select the screen video mode :

                0 -> automatic
                1 -> 256x240
                2 -> 320x240
                3 -> 360x240
                4 -> 320x240 |
                5 -> 400x300 | VESA modes
                6 -> 512x384 |
                7 -> 640x480 |

            When in automatic mode, the emulator selects itself
            the appropriate mode for each game, otherwise the mode
            is locked. The four last modes are available only when
            'vesa' is set to 'y' and if your VESA BIOS supports them.

        fullscreen=[y|n]
        ----------------
            The fullscreen mode is a special 256x240 video mode
            that fills the entire screen, all the black border
            around the display area will disappear. Unfortunatelly
            this mode doesn't work on all the video card...

            NOTE: This mode doesn't work in VESA mode.
            ----

        scanlines=[0|1|2]
        -----------------
            Select the type of the scanlines video mode. This mode
            tries to simulate a NTSC TV on your PC by inserting
            small black lines between screen lines. The software
            mode is safe for all monitors, but the hardware mode
            uses a special refresh rate of 97Hz. Newer monitors can
            handle this frequency, but some older monitors can't.
            If you are not sure, select the software mode '2' or no
            scanlines mode at all '0'. This option is activated by
            the F12 key.

                0 -> none
                1 -> hardware
                2 -> software

            NOTE: This mode doesn't work in VESA mode.
            ----

        laptop=[y|n]
        ------------
            Disable the 360x240 screen resolution for laptop computer.

        sound=[y|n]
        -----------
            Enable or disable sound output.

        16bit=[y|n]
        -----------
            Enable or disable 16bit sound.

        stereo=[y|n]
        ------------
            Enable or disable stereo.

        reverb=[y|n]
        ------------
            If set the reverb sound effect will be enabled at startup.

        master_vol=[0-100]
        dac_vol=[0-100]
        cd_vol=[0-100]
        --------------
            Control the initial volume settings of your sound card.
            If you experiment too quiet or too loud volumes, change
            those settings. If no values are given MagicEngine will
            not change the volumes.

            NOTE: 'dac_vol' has not effect on the Ultrasound.
            ----

        adpcm_vol=[0-200]
        -----------------
            Control the internal volume of the ADPCM channel present
            in the PC Engine CD-ROM unit. The normal maximun value
            is 100; it's possible to increase it, but in this case
            and depending of the game, sound can be distorted.

        sound_card=[0|1|2|3]
        --------------------
            Select the sound card to use in MagicEngine :

                0 -> auto detect
                1 -> Sound Blaster
                2 -> SoundScape
                3 -> UltraSound

        sync_dma=[y|n]
        --------------
            Enable the synchronization of the sound DMA. Try to
            activate this option if you hear scratchy sound!

        info_screen=[y|n]
        -----------------
            Enable the info screen at startup. This screen shows
            the actual volume for the six sound channels, the
            selected frame rate and how many frames per second
            are displayed. Press F11 to toggle this screen on/off.

        cache=[y|n]
        -----------
            When running a CD-ROM game MagicEngine can maintain an
            internal cache in memory. It can speed up some games,
            especially if you have a CD-ROM drive with a slow access
            time.

        cache_size=[4096|...]
        ---------------------
            Define the size of the CD-ROM cache in KB.

        cd_drive=[D|...]
        ----------------
            By default MagicEngine finds by itself the letter of your
            CD-ROM drive, but if you have several drives you can
            specify here the letter of the drive that MagicEngine
            will use.

        system_card_1=[SYSCARD1.PCE|...]
        system_card_2=[SYSCARD2.PCE|...]
        system_card_3=[SYSCARD3.PCE|...]
        system_card_4=[GE.PCE|...]
        --------------
            The CD emulation can not actually run without a System
            Card. You can set the path of four different System Cards
            here, MagicEngine will let you select them from its
            'boot cd' menu.

            NOTE: If no files are specified MagicEngine will look
            ----  for the files indicated above in its own directory.

        path=[GAMES.DAT|GAMES.IDX|C:\PCE\GAMES\|...]
        --------------------------------------------
            Tell the emulator to use a game archive or a game
            directory. MagicEngine can now build automatically a
            menu for you, you just have to indicate the path where
            your ROMs are located and the emulator will make the
            menu and load the ROMs individually. You don't have
            to make an archive anymore.

            NOTE: MagicEngine recognizes only the file with .PCE as
            ----  extension, if you have some ROMs with other extensions
                  you can add them manually in the GAMES.IDX file
                  created by the emulator, or just rename them.


    The header format
    -----------------

    In this version the header format has been enhanced to support
    bigger HuCards, like Street Fighter 2'.  The header is 512 bytes
    long; here is a short description of all the used bytes : 

        offset  size    description
        ------  ----    -----------
          0       1     number of 8KB banks present in the ROM, the
                        maximun value is 128
          1       1     ROM format:
                        ----------
                        bit 0: set if the ROM is splitted
                        bit 1: set when the header contain the title
                               of the game (see below)
                        bit 6: set for an extended HuCard (> 1MB)
                        bit 7: set to inverse the bit order of the ROM
          2       1     number of 512KB extra banks (used for extended
                        HuCards).
         448      1     length of the title
         449      1     checksum of the title (XOR of all the bytes) 
         450     62     title of the game

    The rest of the header is not yet used, but for future compatibility,
    it is recommended to fill this area with zeroes ('0').


    Thanks
    ------

    Many persons have contributed to make what MagicEngine is now,
    I'd like to thank them here, especially : 

                         Peter Kriegesmann
                          Stuart Campbell
                        Jens Ch. Restemeier
                            Dave Shadoff
                               Indi
                    and my brother Cedric Michel

    Special thanks to :

        - All my beta-testers! Nice job guys!!
        - All the registered users! Thank you!!
        - All who have sent me suggestions to enhance MagicEngine!
        - Alex Martin, for having translated the documentation in Spanish!
        - Mauro Grauso, who made MagicEngine more international with
          his Italian translation!
        - Jun Fukushima, for having translated the documentation
          in Japanese!
        - Bt Garner, for providing me a homepage for MagicEngine.
        - Achillefs Margaritis, for having coded this nice
          'fullscreen' mode.
        - DJ Delorie and all the persons behind DJGPP.
        - Shawn Hargreaves, his great ALLEGRO library has saved me
          a lot of work during all the development of MagicEngine.
        - Charles Sandmann, for allowing me to distribute CWSDPMI along
          with my emulator. If you are interested you can get the
          latest version of his program and the source code at this
          address :

              ftp.simtel.net:pub/simtelnet/gnu/djgpp/v2misc/csdpmi*.zip

          Or if you want to contact him via regular mail:

              Charles W Sandmann (sandmann@clio.rice.edu)
              1206 Braelinn, Sugar Land, TX 77479


David Michel
------------
dmichel@easynet.fr

