            .  ___   ____                _________           ___
             .|  `|_|   `| ___ ___  __ .|    ____/ _______ .|  `|
           .:|     _     ||  `|  `|(__)|    (_  `|/   _  `\|____/:.
      ...:::||____|:|____||_______/::::\_________/\_______/(____)::::...
            `-*-- -  -   -    -      -            -              ^cls
                Core-GraphX / PC Engine / Turbo GraphX Emulator
                             Version 1.99
                           5 December 2000


        N.B. When reading this .TXT - "(*)" indicates the main changes

--[ CONTACT INFORMATION ]----------------------------------------------------
    E-Mail :   zeograd@caramail.com (preferred)
               hugo@consolemul.com 
               hugo@fr.fm
               zeograd@icqmail.com

    ICQ UIN :  40632933

    Homepage :
               http://hugo.consolemul.com
               http://www.emuunlim.com/hugo (French and English)
            or http://www.hugo.fr.fm (Ok, it's not a good .com or so but at
               least, my page is not overbloated with ads to pay it)

--[ DISCLAIMER ]-------------------------------------------------------------

    I can't be held responsible for any misuse of this software, it comes
    with absolutely no warranty. Use it at your own risks.

--[ INTRODUCTION ]-----------------------------------------------------------

    Hi everyone, Welcome to the Hu-Go! documentation.
    I (Zeograd) am not really the author of this program. I discovered
    sources of a PC Engine emulator at Bero's Homepage
    (http://www.geocities.co.jp/Playtown/2004/)

    Plus improvements at Hmmx's Homepage
    (formerly, http://www.geocities.co.jp/SiliconValley/7052/).

    Hmmx made XPCE (for DirectX) but I've been interested in continuing
    their work under DOS and voila, you've got another emulator available
    to burn your keyboard playing all night with great PCE games ;)

    This one is free and you've got access to sources as Bero did with his
    work. I'd like people interested in making a good emulator for free to
    contact me to talk about what is missing in Hu-Go!. Don't hesitate
    answering the poll on my webpage or filling the forum you can find there.

--[ HOW TO INSTALL IT ? ]----------------------------------------------------

    Very easy. If you got a ZIP file containing Hu-Go! (most likely), just
    unzip it into a directory on a writeable disk (i.e. hard disk or even
    floppy but do NOT execute from CDROM...)

    You can associate the PCE entension to PC Engine roms under Win9X.
    Add the extension, associate it with Hu-go! and use the nice icon that
    Raoh made, called PCE.ICO. Nice, no ?

    Under Linux, use the script called install.sh that should perform all
    needed manipulations.

--[ HOW TO USE IT ? ]--------------------------------------------------------

    You can hardly make it easier (maybe with a direct synaptic link between
    your brain and your computer to guess the name of the rom...) :
    Just type HU-GO! [ROM] [BACKUPMEM] [OPTION] where ROM is the name of the
    ROM or ISO or ISQ or HCD. Check out the HCD section later for details.
    you want to play with. If ROM has no extension, Hu-Go!
    will look for ROM.PCE then ROM.ZIP. If the ROM has PCE extension, try it,
    then try ROM in ROM.ZIP. Then if ROM has ZIP extension, look for the
    PCE file with same basename as ROM...
    ISO games must be specified with ISO extension to be recognized. Now
    the cdsystem_path variable is no more used.

    (Recommended games - try SUPER STAR SOLDIER or NEUTOPIA 2, you won't
    regret it!. If you don't have any rom, you can try the little demo
    rom included called DEMO.PCE; it's extracted from Magic Kit demos,
    the PC Engine developpement kit from David Michel)

    If you don't specify any rom, you will see a 'cool' file selector =),
    you can quick select a rom by typing its first letters, if you type
    using Shift, you will change drives. F1 oblige the emu to refresh the
    directory and F2 refresh it with forced zip scanning...

    For OPTIONS, see later...

    BACKUPMEM is the name of the file containing the backup RAM.
    These two last are optionals. The order shouldn't import but the ROM name
    must be before the name of backup RAM.
    I'll soon add a GUI, be patient...

--[ SYSTEM REQUIREMENTS ]----------------------------------------------------

    -- Pentium 166 (maybe less without sound; something like 233 or 266 for
       good sound).
       For EAGLE graphics, you'll need a 266 or 300 Mhz machine for full
       speed.

    -- 8MB of RAM.

    -- A DOS compatible system (let me know if it works with versions of DOS
       other than Microsoft's one [MS-DOS]) or Linux

    -- A sound card (only if you want to hear sound, of course).

    -- A small amount of brain cells (enough to control basic motor
       functions. For Cheating and Disassembling, a few trillion more may be
       required ;)

    -- Fingers (may be replaced by a direct synaptic link, I'm working on it,
       if you want to become a guinea pig, let me know too ;) Note - requires
       brain cells specified above.

--[ KEYBOARD CONTROLS ]------------------------------------------------------

    Cursor keys          Direction
    Alt                  Button 1
    Space                Button 2
    Tab                  Select key
    Enter                Start key
    X                    Toggle Autofire 1
    C                    Toggle autofire 2

    (These are default keys for all players)
    You can edit yours using the HU-GO!.INI file (See details later)

    When launching a pinball game, keys will be remapped as follows:

    Left Shift           Left
    Z key                Right
    Stop key             Button 1
    Right shift          Button 2

    This should be enough for flipping and tilting.
    If there are some pinball games that aren't detected (only Time Cruise
    and Devil Cr*sh are now), send me some feedback.

    Special keys:

    Can't be changed (you can always assign these keys to "normal" ones,
    it will mostly have the "special" effects, eventually followed by the
    "normal" ones)
    

    tilde key (under ESC key)   Display the number of frame elapsed
             since the beginning of the track (to create subtitles)
    1 on alpha pad   Toggle the sprites display
    2 on alpha pad   Toggle the background display

-- alpha keys --
   3,4,5,6,7 and 8 on alpha pad
                     May unblock some isos
-- alpha keys --

    - on alpha pad   Lower the sound level
    = on alpha pad   Raise the sound level
    9 on alpha pad   Lower the sound quality
    0 on alpha pad   Raise the sound quality
    CONTROL+ALT+END  Very dirty way to kill the emu, try if freezed.
    ESC              Call the file selector to choose another game
    F1               Enter a value to search for (See details later)
    F2               Set a value in RAM (See details later)
    F3               Freeze a value in RAM (See details later)
    F4               Test purpose key, now display the draft gui
    F5               Save ScreenShot (named pict????.pcx)
    F10              Toggle full speed mode
    F12              Exit (not really useful)
    F6               Save game progression (named ROM.SAV where ROM is the
                     ROM name, Also work for iso file in file names ISO.SVI,
                     For games on CD, only 1 saved game is allowed, whatever the CD)
    F7               Load game progression
    PAUSE            Pause (THIS is creativity ^_^)
    'Num Lock'       Toggle sound dumping mode

    Keys Used on Numeric Keypad
    /                Toggle image dumping mode (in VIDEO/*.PCX)
    +                Skip one more frame per sec.
    -                Skip one less frame per sec.
    *                Disassemble mode (If you don't understand, it's not done
                     for you. This mode is intended for developers and
                     'hackers' only. See 'Developers Corner'...)

--[ OPTIONS ]----------------------------------------------------------------

    There are two kinds of options. Command line or HU-GO!.INI options. The
    emu first reads in the INI file then the command line, so you can
    over-ride general options.

    ** Command line options
    Can be either -FV or -F V where F is the flag and V the value

    -- v : Prefered video mode.
         0 -> Try 256*224 and 256*240 then 256*256 and 320*240 then 320*200
         1 -> Try 256*240 then 256*256 and 320*240 then 320*200
         2 -> Try 256*256 and 320*240 then 320*200 (default)
         3 -> Try 320*240 then 320*200
         4 -> Only try 320*200
         5 -> Only try 800*600

    -- s : Sound mode.
         0 -> No sound
        -1 -> Auto Detect (Default)

    -- d : Set breakpoint on first opcode
        0 -> Don't set breakpoint (default)
        1 -> Set breakpoint on reset vector

    -- c : CD emulation (This way of emulating ISO is no more compulsory but still works,
                         is compulsory for using CDs)
        0 -> Only Hu-card emulation (Default)
        1 -> CD emulation on (just a bit, only first CD drive found and under
                              plain DOS)
        2 -> ISO file emulation on
        3 -> ISQ file emulation on
        4 -> BIN file emulation on (it's a raw full dump, only 1 track supported
          right now, and only if <280 Mb)

    -- i : ISO filename or CD rom drive (This way of emulating ISO is no more
                                         compulsory but still works)
        Conpulsory if -c2 has been specified. If not set, ISO file emulation
        is disabled. Doesn't have any importance is -c is set to any other
        value than 2.
        e.g. if you want to play draculax iso, you must type 'hu-go! -c2
        -idracx.iso' where -c2 indicates you want to play iso files and
        -idracx.iso indicates where is located the iso file. In this case the
        iso is called dracx.iso. The iso you need to play is the cooked
        dump of the second track. If the file you got can't be played but
        heard under winamp, this means you have the wrong track. Just
        track 2.

        When in '-c1' mode (i.e. true CD emulation), allow to specify the CD
        drive to use, e.g. '-if' allow you to use F drive if you're using
        MSCDEX driver
        When you use ASPI driver, '-i' command line option allow you to
        specify the number of your cd drive. Putting nothing will let Hu-Go!
        use the first cd drive it finds. If you want to use your second cd
        drive (whatever its dos logic letter), simply add '-i2' on the
        command line.

	The win version alos this system of numerotation.

    -- e : EAGLE mode
        0 -> Normal mode, no interpolation (Default)
        1 -> EAGLE mode, enhance graphics with interpolation

    -- u : US encoded rom
        0 -> Normal rom (Default)
        1 -> US encoded rom, with invertion of bits
       Hu-Go! should automaticaly recognize such rom but if not (i.e.
       it works only is -u1 is specified) tell me so that I can add it
       to the database.

    -- S : scanline mode
        0 -> Normal mode (Default)
        1 -> Scanline mode (draw 1 line on 2)

    -- m : No bios mode
        0 -> Use bios as much as possible (Default, faster but sometime less
                                           accurate)
        1 -> Use no bios at all as possible (slower but make more game works)

    ** Initialisation file options
    This file accepts comments in lines beginning with a #, the form is
    F=V where F the name of the option and V the value.

    --KEYS : it's a bit long to explain in details but I'll explain the
    method. Each function is represented by a string ("UP","DOWN","LEFT",
    "RIGHT","I","II","SELECT","START","AUTOI","AUTOII") immediately followed
    by the number of the contoller. The value is then the scancode as you
    can find it in the SCANCODE.TXT.
    Now, you can create up to 15 different configs by using sections like
    [config5]. These sections must be at the end of the INI files. They
    contain key definitions as explained above but also info on controllers
    e.g. putting input2=key3 will make the 2nd pad of the PC Engine to be
    controlled by the 3rd keyboard mapping (UP3, LEFT3,...). As valid strings
    you have 'input1' to 'input5' for the 5 PC Engine Gamepads (only 4
    emulated so far), and 'key1' to 'key5' for 5 key mappings, 'joy1' to
    'joy4' for 4 different joypads, 'mouse1' and 'mouse2' for 2 mice (not yet
    implemented) and 'synaplink' for a direct synaptic link (also not
    implemented ;)

    E.G. :
    Setting in the INI file

     config=1

     [config1]

       input1=key1

       UP1=0x16
       LEFT1=0x23
       DOWN1=0x24
       RIGHT1=0x25

       input2=joy1

    This will change direction keys for the first player to 'u','h','j','k'
    while the second player will play with the first joypad. Note that when
    you specify a joy input, only the directions and the 2 buttons are
    remapped so you can still choose keys for select, start, autoI and
    autoII. As an example, the config1 is just a standard input with 1 player
    using a joypad so if you want to play with a joypad just uncomment the
    line with config=1. It's not very clear but a built-in menu should
    allow easier configuration.

    -- language : Language of most messages during the emulation
          0 -> English (default) (by me)
          1 -> Fran‡ais (by me)
          2 -> Espa¤ol (by my gf, and Juan roman Soriano)
          3 -> Slovensko (by ]pit[ )
          4 -> Portuguese (by CodeMaster)
          5 -> German (by sALTY)
          6 -> Dutch (by Fixo)
          7 -> Polish (by Dox and Faust)
          8 -> Italian (by Gareth Jax)

    -- skin : Skin filename to use in the interface. the filename must short
    (i.e. in 8.3 DOS style). The picture must be in 640x480 in 256 colors
    and must accord to a special format. I think it's really time I set up
    a skin list to offer everyone.
            default = skin_h~1.bmp (Short name for skin_hugo.bmp)


    -- rom_dir : Directory of your roms. It's the default directory the
    fileselector will look in. Use either '/' or '\'.
    (Default in INI file is c:\jeu\pce [mine!],
     If no value given, current path is assumed)
    If this directory doesn't exist (Almost certainly the case), use
    the current directory...


    -- smode : Sound mode, same as above...

    -- vmode : Video mode, same as above...

    -- static_refresh : Within the directory showing all rom files you can
    choose whether you want Hu-Go! to scan all files or to use a previous
    scan. Scanning all files may take a long time (especially if you have a
    lot of zipped unknown roms) but using a previous scan can be innacurate
    (files can be deleted or added and Hu-Go! won't list them)
           0 -> scan each time
           1 -> scan only once (F1 for manual refresh, don't forget!)

    -- eagle : EAGLE mode, same as above...

    -- scanline : SCANLINE mode, same as above...

    -- snd_freq : Frequency of the PCM sound output. The higher, the best
    quality but the slower. Use 11025 on slow machines and 22050 or 44100
    on fast machines. You can also give intermediate values.
       22050 Hz is default

    -- buffer_size : Size of the buffer used for PCM sound output. the best
    I can tell you here is to make tests. All depends of the frequency you use
    and your machine speed. I use a 1000 bytes buffer (default) on a K6-2 350
    and 1500 bytes give a not so bad result on a P200.

    -- gamepad_driver : Number of the gamepad driver to use. Check out the
    comments near to this variable in the .INI file to know the different
    driver number. If the driver number isn't correct or any negative value,
    autodetection is done.

    -- sound_driver : Sound driver to use
      0 -> null driver
      1 -> Allegro driver
      2 -> Seal driver

    For information, Seal was the previous driver and Allegro the most recent.

    -- cd_driver : Cd driver to use
      0 -> MSCDEX driver
      1 -> ASPI driver (in fact, any non null value)

    The Aspi driver is the one to choose if you experiment troubles running
    Cds under Windows. There's no need choosing it if the MSCDEX driver
    let you play games...

    -- zip_support : Zip scanning in the file selector
      1 -> scan inside zip archive when refreshing a directory content
      0 -> well, don't scan :)

    Beware, setting this to 0 doesn't prevent you from using zip on the command
    line nor using zip rom in the file selector if alredy scanned once before.

    -- limit_fps  : block of fps to 60 (for fast computers)
      0 -> don't limit, run at full speed (default)
      1 -> limit to 60 fps, when it runs too fast

--[ LINUX ]------------------------------------------------------------------

   With the arrival of a linux port, differences have appeared between different
   version. Theoricaly, the most advenced version is the DOS one but even
   if others won't benefit all system related features, generic ones should
   always be there. Since I take care of both versions, they should be
   released together.
   So, what are the differences betwwen DOS and Linux version ?
   Under Linux :
        o Only one screen mode (320x240 in ModeX)
        o File selector and gui doesn't work (in fact, now the fileselector work
     but isn't useful)
        o No more systematic crash when quiting, but no clean exit yet
      ( However, theoricaly, Linux take care of it correctly)
        o There's a default configuration in /etc/hugo.ini but you can define
     user specific configuration putting such a file in ~/.hugo/hugo.ini.
     It's the same with saved games
        o Default cdrom device is /dev/cdrom, you can change it with -i command
     line option, you must then specify the new device (/dev/hdb, e.g.)
        o Lot of other small changes (linked to case handling e.g.)

--[ HCD ]--------------------------------------------------------------------

   Then what is this new format.
   HCD means : Hu-Go! Cd Definition. Such a file allow you to use multi-code
   CDs and emulate audio tracks with MP3
   It's only a beginning and there are still troubles with ISQ to emulate
   Code tracks but it should work fine later.
   HCD are divided in sections :
   [main]
   for main info :
   first_track=XX
   last_track=XX

   that indicates the first and last track (easy)

   ISO_path=XXX
   MP3_path=XXX

   which are the default path for ISO and MP3 files, convenient when moving
   of directory e.g.
   If you don't specify anything there, the default path is the .HCD one

   minimum_bios=X

   where X is 0 or 1. Use to enable this mode (see in command line option)
   when launching a particular HCD. (Now, this mode is 'no bios' but for
   obvious compatibility reason, I've not changed the name...)

   Then for each track you can find a section :
   [trackXX]
   where you'll find :

   filename=...

   i.e. the filename of the file to use to emulate this track (.ISO or .ISQ
   for code or .MP3 for audio)
   then :

   type=CODE

   that specify if the track is a code one (audio is default)
   et finally

   begin=lsn,XXX

   to specify the beginning of the track in LSN format (# of sector since the
   beginning of the first one) or LBA (# of sector since the beginning of the
   CD) or MSF (theoricaly, only LSN really tested) (as for MSF, just do :
   begin=msf,mm:ss:ff
   add zeros if compulsory)
   even if just a beginning, it allows playing multi-code tracks
   and MP3 in games. (even if .MP3 control isn't yet perfect)
   You'll find an example in the archive.

   There's now another mode available. It's the cd one.
   Write
   type=CD
   and you'll have the ability to fake a track from the .hcd file with a
   track coming from a real cd.
   In this mode, you have 2 mode fields:
   drive=0
   which specify the drive in which is the track you want to use, using the
   format in which the cd driver is used to. i.e. 0, 1 and such.. for aspi
   driver and letter D, E, and such for the mscdex driver.

   Then you can specify the number of the track to use on the cd driver with
   track=5
   If you don't specify this field, the default value for the track field will
   be the track number of the track to fake.


   You can also use patching functions

   patch_number=XX

   where XX is the number of patch you want to apply

   then

   patchX=0X????????,0X??

   where X goes from 0 to patch_number-1 and two hexa numbers represent
   the offset and new val of the patch in the ISO file.

   On the same model, you can also find a way of adding subtitle when audio
   tracks are played (even if you don't own the MP3 for it). You can choose
   the number of subtitles with : 
   
   subtitle_number=XX
   
   where XX is the number of subtitle you want to have for the track.

   You can also choose to synchronize the subtitles with the game or the
   music with

   synchro_mode=XX

   if XX = 0, synchronisation is done with the game as in the first release
   supporting it, else it's synchronised with music and you can replace
   the words 'number of frame' by '60th of sec' in the following explanation,
   concerning the meaning of the begin field.

   Then, for each subtitle, you must choose the time where it should begin,
   its duration and the message to display.
   The syntax is as follow :
   
   subtitleXX=<begin>,<duration>,<message>
   
   where XX is the number of the subtitle (XX is between 0 and subtitle_number-1)
   <begin> is the number of frame elapsed since the beginning of the track.
   There's normally 60 frame per sec but using the number of frame instead
   of time make subtitles synchronized with the real game and not the music.
   Since it's harder to guess how many frame have been displayed, I've added
   a display of such a number with the tilde key. The value that you'll see
   when pressing the key is the exact value you'll have to put in the <begin>
   field (ajusting them a bit if needed...)
   The <duration> field is in 60th of second, i.e. putting 60 there will
   display the message for 1 sec and finally, the last field is the message
   that will be displayed. It shouldn't contain any comma.
   One last thing : you must sort the subtitle according to the order of
   appearition.
   Don't hesitate looking at the example or sending a mail if needed.

--[ SOUND ]------------------------------------------------------------------

    As you have read it, you can now choose between two different driver.

    Allegro :
     + Best quality
     + Allow MP3 support
     + Stop out of the emu (GUI, ...)
     - Need a 'powerful' machine
     - If desynchronized, stop emu during a moment

    Seal :
     + Need a weaker machine
     + Don't stop emu if desynchronized
     - Lesser quality
     - Less well integrated ( no MP3 nor Gui stop, ...)

    For those you haven't got sound... Sorry. I told you it was
    very primitive, if you haven't specified -s0 or -s 0 on command line
    (which disables sound), Hu-Go! will try to autodetect your card and then
    choose the first one (if more than one is present) for the rest of the
    emulation. Maybe a correct environment variable setting will help in the
    detection (you know these strange statements in AUTOEXEC.BAT :
    SET MY_CARD = I1 D0 NT UN DER ST@ND, HE1P [crappy one, I know] )
    As far as quality is concerned, sound is only in 8-Bit mono.
    If you want almost perfect sound, try dumping sound : between two presses
    on 'Num lock' the sound will be saved in WAV format to disk and listenable
    with any good multimedia player.

--[ HOW TO SPEED THINGS UP ]-------------------------------------------------

    Seeing that new features may slow the emu down a bit, I've decided to
    highlight a few tricks to get a more playable Hu-Go!.

    -- Try the -v4 switch on the command line. In 320*200 mode you will get
       about 10% more speed but (there's always a "but") the screen will be
       clipped (i.e. you won't be able to see the first and last 12 lines).

    -- If you usually play under WIN9X, try to play under plain DOS, you
       may gain about 15% extra speed.

    -- Disable sound with the -s0 command line switch or by putting sound=0
       in the .INI file.

    -- Disable EAGLE mode with the -e0 command line switch or by putting
       eagle=0 in the .INI file.

    -- Disable SCANLINE mode with the -S0 command line switch or by putting
       scanline=0 in the .INI file.


    -- Don't forget you have a skip frame option using '+' and '-'. Things
       become less smooth but a lot faster (up to 16 times).

    -- If your hard disk keeps on accesing data while playing, it means you
       don't have enough RAM and it is using virtual memory on disk (which is
       a lot slower). You should try to make a 'clean' boot without any
       drivers etc. loaded.
      If this is still not enough then the only option is to buy more RAM (I
      don't think you would ever have to do this, Hu-Go! is very economic ;)

    -- Buy a faster computer ;)

    To give an idea, under DOS, in 320*200 mode without sound, I can reach an
    average rate of 125 frames/sec on a K6-350 (and 55 on a P200).
    On my K6-350, I reach the limit of 60 frames/sec. everytime. On a P200,
    with the sound on, I only need to skip 1 frame to obtain full speed and
    good sound under Win95 (in any video mode).
    [and about 7 frames/sec. on a 486DX33 with 4MB in 256*240 without sound]

--[ IMPROVEMENTS ]-----------------------------------------------------------

    Here will find all sorts of idea to improve Hu-Go!. You can wait until
    the following tasty options are implemented or give a hand, it's up to
    you. I've added a difficulty indicator (E : Easy, M : Medium, H : Hard),
    for people who want to help, so you can tackle a subject at your level;
    for most users, easy tasks should come first.

EMH
X  -- Way of saving cheat results to apply them from a little menu with a
      short description...
X  -- New transitions (I love this, don't really know why)
X  -- Better comments in sources to help everyone compile it or port it
X  -- Auto frame ajusting
X  -- New feature to help PCE developpers
 X -- A nice GUI to change options while playing
 X -- Precalculation of sprites (may increase speed)
 X -- Way to make people understand I desperately need some feedback (did you
      love it, hate it, eat it?)
  X-- Changing core sources (from Marat Fayzullin to Dave Shadoff one, or
      maybe another)
  X-- Localisation of the bug which causes a sound channel not to get
      played
  X-- Ports to other platforms - BeOS, Amiga etc.

--[ CHEATING ]---------------------------------------------------------------

    I've pondered at length as to whether to include such an option. If I'm
    not mistaken, Hu-Go! is the first emulator to propose this type of
    option. Cheating is very primitive and there is no visual help so you
    can't see what you type...

    BUT...

    It works! If you want to cheat with the number of lives in a game,
    first you run your game, then you type F1, the game stops. This is
    normal. It's waiting for the value to search. Then you enter the number
    of lives you actually have (In fact, it only considers the lower byte of
    the value you entered), then it makes a search and shows you the result.
    Play around and lose a life, repeat the same as above, pressing F1 and
    entering the current value. Repeat it again and again until the search
    only finds one value..
    Note carefully this value, it's the offset in RAM of a variable that
    contains the value you've entered. Is it the correct value? Easy, press
    F2, the game stops then enter the offset noted before and the new value.
    Normally you should have as many lives as you want.
    If you got a 'SEARCH FAILED' then ... it failed, see below for help.
    Using this method, the value is only changed once, but if you press F3
    then enter the offset and the value, it will be changed to the specified
    value 60 times per sec., so it looks like it is frozen. Pressing F3 then
    the address will unfreeze the value.
    Now, you can research value using a relative method. that's to say that
    instead of searching exact values, you can simply tell hu-go! to search
    for variation of the variable. e.g. each time you lose a life, you can
    make a research on -1, i.e. the variable you're looking for have been
    decreased by 1. With this method, you don't have to worry about the base
    value used to represent the variable (see hints concerning this).
    When you want to make a relative research, you have to use F1 as
    previously but instead of typing the plain number, you must prefix it
    with '+' or '-'. For the first research, you don't have to worry about
    the value you're giving, it's simply used to initialize the temporary
    file containing all the possible variables with all the current values.
    Once done, you can press F1 then '+1' or '-3' and such. From a technical
    point of view, it's possible to mix normal and relative research but if
    you do absolute research, there's no point on doing relative one.

--[ CHEATING HINTS ]---------------------------------------------------------

     -- Be careful, you may think the cheat didn't work, in fact, some
     variables aren't updated each frame so try to lose a life or if you
     modified money try to buy something... then you may see the difference.
     -- You aren't obliged to search for altered values, you can make a
     search for 2 lifes then 5 sec. later you search for 2 lifes again,...
     I suggest you search for the same value twice very quickly. If you look
     twice for the same value with only a half a sec. interval, you will
     certainly eliminate a good amount of 'bad' variables.
     -- Once a search is complete and you no longer get a lot values each
     time you search, you may stay stuck because two variables have the same
     value at the same moment (often for core and screen purposes). If that
     is the case go and check the file named ROM.FP0 (where ROM is the name
     of the rom), this contains the different possible offsets. It's up to
     you.
     -- Sessions of research are kept between two launches of the emulator.
     -- If you want to start a new session, just make a 'SEARCH FAILED'
     (Search for 25 then 6 then 79 in a very reduced interval, if you can't
     get an 'SEARCH FAILED' then you will be the next on my guinea pig list
     for trying the direct synaptic link ;).
     -- Sometimes, the value on screen isn't stored like shown, e.g. if you
     have 5 lives, maybe the variable 'LIFE' is set at 4 or 6, try to search
     for 'value'+1 or 'value'-1, it may work... (like the number of balls in
     Devil Cr*sh).
     The best to avoid this kind of problem is using relative value research.
     -- The search only works on bytes but a variable may take 2, 3 or more
     bytes. In this case try modifying the byte just 1 byte above or below
     the one you found (e.g. if you've found that putting a value at address
     X would change the money a bit, putting a value at address X+1 will
     certainly change the money a lot).

--[ DEVELOPERS CORNER ]------------------------------------------------------

    This section is not intended for 'normal' users (I mean players), it is
    designed for people who know about the PC Engine's internal workings and
    want to learn more, debug their own roms, translate, etc...
    Well, now only interested people should be reading ;)
    First, when you press a key, you must know that the effect can only take
    place when the PC E reads the input. This explains why you can only get
    in the same piece of code each time you press the 'disassemble' key (I
    think).
    When disassembled, you can easily move forward but when you move
    backward it tries to disassemble 1,2,3,4 or 7 bytes before. It keeps the
    first result that doesn't cause illegal instructions. If it doesn't work
    it will just go backward one byte.
    There isn't lot of protection, i.e. it shouldn't be very hard to make
    the emu crash (and the computer at the same time) if you push it too
    much. However if you've found a way to make it crash consistently in a
    given circumstance, please tell me.
    Breakpoints are implemented using the illegal instructions 0x?B, the
    first 14 are user definable; the last one is reserved for 'go to cursor',
    'step', 'trace',... usage. And the other is made to simulate a run i.e.
    when you stop after a breakpoint, you can want to continue but I need
    to replace the breakpoint that made you stop, what I do, but then, where
    can I put the invalid op code from the place that has just been executed?
    That's why I use a pseudo-breakpoint that stops just after the execution
    of the previous instruction, replace it and replace itself so next time,
    the BP will still be there. I'm obliged to do that because I don't have a
    single step function and I try to simulate this as well as I can with a
    full speed running function (If you know a better way to do this [without
    too much work ;)], let me know). As for now, it don't work perfectly
    but we're near to.
    When disassembling, invalid instructions of breakpoints are only replaced
    by the good one if the first byte of an opcode i.e. if you've set a
    breakpoint then by going up lose the true stream of instructions you will
    have invalid parameters for instructions that are placed just before the
    breakpoint. It isn't clear but you will notice this 'bug' alone.
    If it really bothers you, I can replace this but I expect disassembling
    to be much slower... Currently breakpoints aren't totally implemented,
    you can set/unset one with F2, when hit, it will disappear.
    Using F7 and F8 in this mode, you can trace and step through the code.
    F8 is the step key, i.e. give you control just after the current
    instruction has executed, on subroutine calls, execute the whole routine.
    On the contrary, when calling a subroutine, F7 will trace, i.e. go to
    the first opcode of the routine.
    With F3, the disassembler wait for a hex number as usual and set a
    breakpoint there. And with F4, the execution goes to the current selected
    opcode.
    F5 will force the PC to be set to the current place and F6
    nops the current selected opcode.
    With 'G', you can specify the address you want to see (in hex, w/o
    prefix).
    These features haven't been extensively tested but seem to work well, so
    if you find any bugs, try to reproduce it. If you can, please tell me the
    way to create this bug so that I can remove it...
    Implemented keys are 'up','down','pg up' and 'pg down', with F1 you get
    a screen with the main keys.
    The RAM editor is launch with 'r' when in disassembling mode. You can use
    normal keys to navigate throught the RAM and with 'Space' you replace the
    current selected byte, just type down the new value, 'Enter' accepts it
    and 'Esc' returns the old value...
    As for CD emulation (and normal one), i've added two nice features:
    with 'i', vous can go to an information screen of two pages (but that
    can be more if needed) giving details on general registers and CD related
    variables. Use left and Right to go from page to other, 'Esc' or 'F12'
    to quit.
    You can also see the satb with all attributes of all sprites
    with the 8 pages of 8 sprites each...
    With 'z', you can access a Zero Page viewer. 256 first bytes can be view
    there, but not edited.
    I'd like people who use these features to send me feedback about what's
    useful, what's not, what could be, and so on. This is a domain where
    there are many things to do...

--[ THANKS ]-----------------------------------------------------------------

   Special thanks :
 *> -- Bacon boy 99 (Ex-Planet Rom webmaster, the former logo,    <*
       having sent me some Cds and in fact, lots of things)
    -- ]pit[ for all his help (among all the new logo and banners)
    -- Nyef for all the infos he gave me on CD emulation
    -- Lester Barrows for his help on the linux code (notably, pad support from
              his work)
    -- Ishan (ex Vlendr'it) for the mailing list, tweak mode tests, finding
       nice code resources on the web and scanline mode
    -- TOZTWO for the nice HTML doc
    -- Tormod Tjaberg for the MP3 length detection code
    -- fixo, cools, sALTY, codemaster, Raoh, MrF, dus, Yuu and all the #emu
       dudes on IrcNet ;)
    -- ElmerYud coz' he's Hu-Go! publicity manager ^_^
    -- tAGGY for two nice pictures
    -- SirJaguar, Nico, Ded, ZePoulpe, Leto_II, Ziller, Readiosys and guys on
       #emulateur or #consolemul
    -- Dirk Steven (EAGLE is really very nice)
    -- Dave Shadoff (TGSIM and TGSIMGPP, longs mails and lots of ideas,
       author of the little rom included, very nice guy)
    -- Marat Fayzullin (BASE SOURCE for 6502)
    -- Bero (Additional SOURCE)
    -- Hmmx (More additional SOURCE)
    -- DJ Delorie (DJGPP, what a great thing!)
    -- Shawn Hargreaves (ALLEGRO is great)
    -- David Michel (MAGIC ENGINE is still the best emu!!!, futhermore he's
       very friendly and fair-play. Also the Author of the Magic Kit which
       allow you to create your own PC Engine games)
    -- Emu unlimited (www.emuunlim.com)
       for hosting my site.
    -- Consolemul (www.consolemul.com)
       for doing the same
    -- The info-zip group for making unzipping easy (sometimes ^_^)

    -- Zophar domain (www.zophar.net)
    -- Jens Christian Restemeier (DOCS)
    -- Joe LoCicero (DOCS)
    -- Bt Garner (DOCS)
    -- David Woodford (DOCS)
    -- Videoman (DOCS)
    -- Charles W Sandmann (CWSDPMI, this program is under GPL license and you
       can get the source at http://www.delorie.com/djgpp/ )
    -- Markus F.X.J. Oberhumer & Laszlo Molnar (contribution to UPX, an
       excellent EXE-packer used in this release)

    Diverse thanks:
    -- Bouli (www.multimania.com/booemu/
              arcades.le-village.com/megrom/)
       for using Hu-Go! for his screenshots ;)
    -- Michael Sheldows (www.homestead.com/sheldows)
       for trying to port Hu-Go! to a new OS of his own
    -- Mr Iceberg (www.multimania.com/pceaudit)
       for offering a PCE ROM manager based on FPCEID

    Others I may have forgotten (Sorry!!!)
    (send me a mail if you consider you should be credited...)

    If you have any questions, suggestions, propositions for help or
    mirroring, bug reporting, or non working games, don't hesitate,
    send a e-mail (I love e-mails) to : ZEOGRAD@CARAMAIL.COM

    (You can also send money, car keys, credit card with PIN number,
    video games, girlfriends, ask for snail mail address !! ;)

      .  ___   ____                _________           ___
       .|  `|_|   `| ___ ___  __ .|    ____/ _______ .|  `|
     .:|     _     ||  `|  `|(__)|    (_  `|/   _  `\|____/:.
...:::||____|:|____||_______/::::\_________/\_______/(____)::::...
      `-*-- -  -   -    -      -            -              ^cls

