Copyright 1999-2002 By Alexandre M. Maoski

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.





                                Power MSX  1.00
                               

Date: 02/02/2002
Author: Alexandre M. Maoski


        Power MSX is a MSX emulator that runs on DOS and emulates an MSX2
with FM-PAC (MSX Music) and PSG. Almost all the features of MSX-2 are
emulated, and it has a high level of compatibility. It has also automatic
MegaROM detection for the majority of Megarom Games. The FM-PAC is the one
made by Mitsutaka Okazaki. It sounds great. The PSG is the same, and it
is very good also. The Z80 passes the ZEXALL test and it is a version
modified by me of Marat's Z80. A user-friendly GUI is also included, which
configures almost all the functionality of the emulator.

Features:
        MSX-2:
        Screen 4 - Nice -Runs Space Manbow, Psycho World
        Screen 5 - Nice
        Screen 6 - Lacking the sprite tiling
        Screen 7 - Right - Just rendering it in low resolution
        Screen 8 - Not emulated - wrong colors
        Width 80 - Just rendering in low resolution and blink is missing
        Interlace and page flipping - missing

        Interrupts: I finally managed to fix interrupt handling.
        All games the showed some kind of interrupt problem are
        running nice, like Thexder, Golvellius 2, Xevious, Guardiac,
        among others.

        Sprites:
        Msx 1: All sprite modes.
        Msx 2: Only 16x16 not Expanded emulated.

        Commands of VDP:
        All commands of VDP are emulated, except LINEs in diagonal,
        but some bugs are expected to be present in this
        first MSX-2 version.

        Clock:
        The MSX-2 clock is working. It saves a file CLOCK.SRM, so it
        retains your screen configuration (SET SCREEN), beep (SET BEEP)
        and SET ADJUST.

        Megarom:
        In this version there is an automatic ROM detection. The CRCs
        from the Funet ROM's are detected in the emulator. FM-PAC mapper
        works (you can type CALL FMPAC) but it doesn't have SRAM.

        Mapper:
        It runs most of the Mapper games. Games that do an IN A,(FCh)
        won't have the correct page returned.

        Megaram:
        Works fine.

        Disks:
        The routine that read and writes sectors of the disk is somewhat
        limited and won't work if you configure your Drive interface in
        other Slot than 2, and RAM in Slot 3. Don't change them
        in MSX2.CFG.

        Tape:
        Works fine.

        Interpolation and Scanlines: Removed in this version. They will
        probably return when I change the graphics engine to 16 bits.

        Hangs: Sometimes, if the the emulator appears to have hanged,
        try to press F6, and Q and ENTER. This will get out of
        emulation.

        Configuration: You can change the configuration of msx model
        just typing for example <PMSX =msx2pal> for running a msx2
        in pal mode.

Things to be done:
        SCC emulation.
        Acurate PPI sound.
        Support PSG samples.

Known Bugs:

        - Problems with colors in Hydefos, Psycho World and Dragon
        Slayer 4. These games are trying to change the pallete
        during the screen rendering. They'll only run perfectly
        when I go to 16 bits (65Kcolors) rendering.
        - Problems in Xak 3 intro and Andorogynus (probably a
        missing feature in a VDP Operation).
        - Zanac-Ex -> The game hangs due to missing collision
        detection in MSX2 sprites.

Usage: pmsx [options] [carta.rom]

Options:
        =<file>         Name of script that defines
                        the MSX configuration.
        -diska <file>   Name of Drive A image.
        -diskb <file>   Is not working in this version.
        -tape <file>    Name of the tapeimage
        -fs <num>       Number of frames that will be cutted. 0 means
                        that all frames are displayed. 1 means that 30
                        in 60 frames are rendered. 2 that 20. And so on...
                        The default is 0.
        -sr <num>       Sample Rate. It goes from 5000 to 45100.
                        Default is 44100
        -sound <num>    sound 0 : No sound.
                        sound 1 : Soundblasters
        -debug          Enter the emulator right into the debugger.

Keys in emulation:

        F12 quits emulation.
        F11 enters GUI.
        F6 Debugger
        PAGEUP is STOP.
        PAGEDOWN is SELECT.
        Left ALT is GRAPH(LGRA)
        Right ALT is CODE(RGRA)
        Numeric / is the Screen adjuster.
        F7,F9,F10,PRINTSCREEN,SCROLLLOCK,PAUSE aren't used yet.
        The other keys work as in a MSX.

Debugger operation:
        T <number>      Number is opcional. Executes number
                        instructions. If number is missing
                        executes one instruction.
        V               View MSX screen (wrong colors if MSX2)
        B <number>      Breakpoint on number Address.
        Q               Quits emulation
        TAB             Changes the active window.
        UP, DOWN        Depending on window, navigates through.

                        While on Registers or Memory, you can
                        change values by typing hexadecimal
                        numbers.
        PGDOWN,PGUP     Scroll faster than UP, DOWN
        ENTER           Executes the current instruction.
                        It's the same as T 1.

        The number that are on the upper right corner of the screen
are, respectively, Number of remaining cycles left in the current
screen line, The current screen mode, and the current line rendering.
The current line rendering is not the MSX line. In NTSC it reaches 262,
and in PAL 313, as specified in the manual of V9938. VBlank interrupts
are generated in line 192 or 212, depending on the screen mode.

PMSX 1.00:
   -MSX2 implemented.
   -RTC implemented. (MSX2 clock)
   -MSX Music (YM2413) by Mitsutaka Okazaki 
   -Interrupt handling done.
   -Lots of bugs with MSX1 sprites and memory.
   -Megarom CRC detector, with almost all Megarom
    games from funet.fi typed.
   -Script files extended.
   -Gamma correction.

PMSX 0.07:
   Changed:
   -Z80 fixed. Now it passes all the ZEXALL tests.
   -VDP now is emulating some strange features. It runs Thing
Bounces Back perfectly!
   -Added a frame counter.
   -Corrected some sprite bugs.
   -Fixed a disk offline bug.
   -Implemented -ifreq, so our european fellows can run the emulator at
their perfect speed, while we can run european
games as they were programmed to behave.

PMSX 0.06:
   The VDP was entirely rewritten. Now the graphics engine is line
based, providing a very precise emulation. Sprites 8x8, and Magnified
sprites were also emulated. The fifth sprite in a row is disappearing,
as it is supposed to happen.
   Sprite colision bit is also emulated. So, I think this VDP should
run perfectly 99% of MSX-1 software! If something works strange,
please e-mail me.

Previous Versions:

In this version, you have also some extended video modes. If you have
VESA2, you can try (320x480, Intensity 75%), is almost like TV. I have
added also Interpolation X, Scanlines, and Double modes.

In this version, MEGARAM and MEMORY MAPPER are implemented, and can
be used by setting them in MSX.CFG.
The first line in MSX.CFG should be mapslots=a,b,c,d
        where the letters must be 0 or 1, whether the slot is expanded
        or not. mapslots=1,0,0,0 means that only slot 0 is expanded.
Then you should have the structure: slot a,b { ... }
        to specify what you want in that slot. a,b is slot,subslot. If
        that slot isn't expanded, put simply a,0.
Inside the slot structure:
        You can reserve RAM (in PACKS of 8Kb): RAM 64
        You can set memory unused (in PACKS of 8Kb): UNUSED 8
        You can load a ROM: ROM "\roms\msx.rom" 32 --> 32 is the size(Kb)
        Memory Mapper: MAPPER <size> in blocks of 16Kb
        Megaram: MEGARAM <size> in blocks of 8Kb
        Patch a ROM: patch {adress:aa,bb,...;}

        For example: slot 0,0{rom "msx.rom" 32} will load the MSXROM
                slot 1,0{unused 16 rom "disk.rom" 16} will load DISK.ROM,
                starting in page 1, or adress 4000h
        Comments are standard C, /* and */

Other aspects of the emulation
can be setted in the PMSX.INI.

Inside the DEBUGGER, you can walk through the assembly code with UP and
DOWN, and faster with PGUP and PGDN. To execute the current instruction
press ENTER. To set a BREAKPOINT, type B <number>, where number is the
hexadecimal address you want to be breakpointed. Type V to see the current
output of the VDP. You can swap the windows with TAB. When the window is
in the REGISTERS, you can alter them directly with cursor key + numbers.
The MEMORY window can be navigated with PGDN/PGUP, UP/DOWN, and also can
be changed, just like the REGISTER window.

Thanks:
        All MSX emulators.
        Mitsutaka Okazaki for his excellent YM2413 emulation.
        Marat Fayzullin for his portable Z80, which I'm using here.
        Shawn Hargreaves for the Allegro Library.
        Carlos Hassan for the Sound Library, SEAL.
        The people producing MSX Software and scanning technical docs.
        This emulator would not be possible without these online resources.
        All the MSX users worldwide.
        Fabricio Maoski and Antonio Kantek for helping with suggestions
        and ideas to enhance PowerMSX.

Please e-mail me with ideas, comments, bugs or info about software
        that doesn't work.



Alexandre M. Maoski, amaoski@ig.com.br
You can check for new versions on my site: http://www.geocities.com/ammaoski
There you can find the sources too.
To be compiled you need DJGPP + ALLEGRO + SEAL
Thanks


