
    R o c k N E S
    NES 8-bit videogame emulator
    NSF chiptune player
    http://rocknes.web.fc2.com
   --------------------------------
    1998-2021 Zepper
    Version 5.80, May 31st 2021
   --------------------------------

    *************************
    * C O N T A C T   M E ! *
    *************************
   - #NESdev forums (topic): http://forums.nesdev.com/viewtopic.php?f=3&t=20789
   - e-mail: fx3rnes@hotmail.com
   - ICQ: 12292568

   +--------------+
   | TERMS OF USE | last update on May 31st 2021
   +--------------+-----------------------------

          RockNES is free software. It can be distributed free of charge, as long as
   no changes have been made to the original packaging. Be aware that the most popular
   NES games are still protected by copyright, with all rights reserved. In most cases,
   the distribution of ROM images of such games infringes copyrights.
          Please DO NOT distribute RockNES software along with infringing ROMs.

   * No warranty, use it at your own risk.
   * The official package contains only the following files:

     RockNES.exe - NES emulator.
     rocknes.txt - This document.
     oldnews.txt - Log of updates.

   * IF YOU DISAGREE, PLEASE, DELETE THIS SOFTWARE NOW.
  [================================================================================]

 What's new for version 5.80 (05/31/2021)
 -----------------------------------------
[savestate]
 - The savestate version has been changed to 8, so older states are no more compatible.
 - Added/fixed proper savestate support for ALL mappers.
[sound]
 - Added support for Namco 163 sound (mapper 19).
 - Added mapper 210.
 - Fixed NSF init/play/reset.
 - Fixed sound recording status when stopped.
[mappers]
 - Fixed MMC1 (mapper 1), plus support for 512k games (Dragon Warrior III and IV works).
 - Fixed mappers 69, 72, 76, 78 and 92.
 - Fixed IRQ counter on mapper 19 reset (Sangokushi II: Haou no Tairiku works).
[gui]
 - You can press Ctrl+F to call the "File info" dialog while in the GUI.
 - CPU state info dialog now supports NSF.
[general]
 - General adjustments, cosmetic changes and cleanups.
 - Documentation reworked and usual fixes.

   * Please, read "oldnews.txt" for the full history of updates.
 
 ---------------------------------------------------------------------------
   = KNOWN EMULATION or SOFTWARE ISSUES =

   - The NSF chiptune player runs only at 60hz.
   - Possible sound skipping.
   - There's a small chance of a deadlock while playing NSF files.
   - Video triple buffering works only in fullscreen mode.
   - No support for PAL PPU (50hz).
   - Sprites and background rendering engines need a rewrite.
   - The GUI is subject to be glitched due to the Allegro's library limitations.
 ---------------------------------------------------------------------------

    +===================+
    | Table of contents |
    +===================+

    1. Description
       1a. Supported files.
       1b. iNES header format.
       1c. NES memory overview.
       1d. Supported features.
       1e. Unemulated hardware/features.

    2. Player controls
       2a. Default settings.
       2b. Hotkeys and shortcuts.
       2c. Input devices.

    3. Using the GUI
       3a. Drop-down menus.
           - NES memory dump.
       3b. Dialogs and options (quick description):
          - GUI colors;
          - sound settings;
          - general settings.
       3c. Restoring default settings.
       3d. Using Game Genie codes.
       3e. The PRG ROM disassembler!

    4. Video
       4a. Screen size (upscalers).
       4b. Setting up a video resolution.
       4c. Custom fullscreen mode.
       4d. Wallpapers.
       4e. Palettes
       4f. Color styles.

    5. Sound
       5a. Description and default settings.
       5b. Playing NSF music files.
       5c. Recording WAV files.

    6. Movies (joypad data logging)
       6a. Introduction.
       6b. How to record and play movies.
       6c. Saving states during a movie.

    7. Savestates
       7a. Introduction.
       7b. Operations and controls.
       7c. File format and general info.
 
    8. Hardwares
       8a. NES (stands for Nintendo Entertainment System).
       8b. VS Unisystem and PlayChoice10.
       8c. Famicom Disk System.
   
    9. Credits (no special order) 

 [==========================================================================]

    +----------------+
    | 1. Description |
    +----------------+
 
      * RockNES is an emulator of the NES 8-bit videogame, released in North America in 1985.
  It's fully coded in C and it uses the Allegro library (4.4.x version) for audio, video and
  input devices. The zLib library is used for loading compressed files. 
      * Available for Microsoft Windows only.
 
      - Compiled with gcc (MinGW.org GCC Build-2) 9.2.0 with Orwell's Dev-C++ interface.
      - Sound output rate is at 44100hz. 
      - Default video mode: 512x480 windowed, 1:1 pixel.
      - Supported input devices: keyboard, mouse and controllers via USB.
      - ZIP files are supported - the first file of the archive is loaded.
      - Special characters (like , , , ) are NOT supported.
      - Command line switches/options are NOT supported.

      1a. Supported files
      *******************

      * Once the GUI bar appears, select [Game]->Load ROM.
  The files within the following extensions will be listed.

      .NES - NES/Famicom games.
      .FDS - Famicom Disk System games.
      .NSF - Chiptune music.


      1b. iNES header format
      **********************

      * It's composed by 16 bytes at the beginning of a .NES file.
      Here's an easy description.
      +--------+------+------------------------------------------+
      | Offset | Size | Contents                                 |
      +--------+------+------------------------------------------+
      |   0    |  4   | NES + $1A                                |
      +--------+------+------------------------------------------+
      |   4    |  1   | Number of 16kib PRG ROM banks.           |
      +--------+------+------------------------------------------+
      |   5    |  1   | Number of 8kib CHR ROM banks.            |
      +--------+------+------------------------------------------+
      |   6    |  1   | Control [lower byte]                     |
      |        |      |   %mmmmVTSM                              |
      |        |      |    |  ||||+- 0=Horizontal mirroring      |
      |        |      |    |  ||||   1=Vertical mirroring        |
      |        |      |    |  |||+-- 1=Backed battery            |
      |        |      |    |  ||+--- 1=Trainer data (512 bytes)  |
      |        |      |    |  |+---- 1=Four screen mirroring     |
      |        |      |    |  |   (overrides H/V mirroring flag) |
      |        |      |    +--+----- Low 4 bits of mapper number |
      +--------+------+------------------------------------------+
      |   7    |  1   | Control [upper byte]                     |
      |        |      |   %MMMM--PU                              |
      |        |      |    |  |  |+- 1=VS Unisystem              |
      |        |      |    |  |  +-- 1=Playchoice-10 system      |
      |        |      |    +--+----- High 4 bits of mapper number|
      +--------+------+------------------------------------------+
      |  8-15  |  8   | Reserved, must be zeroes. Dirty headers  |
      |        |      | bring garbage here, be warned!           |
      +--------+------+------------------------------------------+


      1c. NES memory overview
      ***********************

      CPU  
      $0000-$07FF: Main NES RAM.
      $0800-$1FFF: Mirrors of $0000-$07FF.
      $2000-$2007: PPU registers.
      $2008-$3FFF: Mirrors of $2000-$2007.
      $4000-$4017: APU registers ($4014 PPU OAM DMA, $4016/$4017 joypads).
      $4018-$5FFF: Unassigned or mapper controlled.
      $6000-$7FFF: RAM: battery or PRG data.
      $8000-$FFFF: PRG ROM banks in 8, 16 or 32k chunks.

      PPU
      $0000-$0FFF: Low pattern table.
      $1000-$1FFF: High pattern table.
      $2000-$2FFF: Nametables.
      $3000-$3E1F: Mirrors of $2000-$2FFF.
      $3F00-$3F1F: Palette indexes.
      $3F20-$3FFF: Mirrors of $3F00-$3F1F.

      1d. Supported features
      **********************

      - NTSC standard hardware only.
      - Full emulation of the 6502 CPU (+ unofficial opcodes), APU and PPU.
      - Joypads 1 and 2.
      - Konami VRCVI sound expansion.
      - Namco 163 sound expansion.
      - VS UniSystem and PlayChoice10 support (requires iNES format).
      - Cartridge battery save support.
      - Famicom Disk System (partial).
      - NSF chiptune music player.
      - Supported mappers: 0,1,2,3,4,5,7,9,10,11,13,15,16,18,19,20,21,22,23,24,25,26,
      32,33,34,40,41,42,43,44,46,48,57,58,64,65,66,67,68,69,70,71,73,75,76,78,79,83,85,
      86,87,88,89,90,91,92,93,94,97,99,101,113,117,118,119,150,151,160,180,184,187,189,
      210,211,225,226,227,228,229,230,231,232,233,234,235,240,243,246,255.
      - Joypad data log for replays, also named "movies".
      - Ability to save/load your progress at anytime, even during movie recording.
      - Ability to modify any NES memory space.
      - User's interface (GUI) and configuration file (RockNES.ini).
      - Sound output recording in WAV format.
      - 6502 CPU disassembler.
      - Pseudo stereo sound.
      - Screen upscalers 240p, 480p, 720p, 960p and 1080p.
      - Screen aspect ratio: 1:1 pixel, NTSC square, 4:3 VGA.
      - Screen triple buffering in fullscreen mode.
      - Vertical retrace sync.
      - Motion blur effect.
      - Ability to dump any NES memory.
      - Palette/colors viewer.
      - Game Genie codes.
        
      1e. Unsupported hardware/features
      *********************************
      - PAL emulation (50hz), full Famicom, Dendy and other variants.
      - Zapper, Power Pad and other input devices.
      - Joypads 3 and 4.
      - VS Dualsystem/Playchoice-10 upper monitor (requires z80 CPU emulation).
      - Sound expansions for MMC5, VRC7, Famicom Disk System and others.
      - MMC5 split screen mode for the game Uchuu Keibitai SDF.
      - Emulation rewind.

 [==========================================================================]

    +--------------------+
    | 2. Player controls |
    +--------------------+


      2a. Default settings
      ********************

      Player 1 uses KEYBOARD as input device (joypad).
      Player 2 has no default input device assigned.
 
         [KEYBOARD]
    D-pad  = Keyboard arrows.
    B      = Z key.
    A      = X key.
    SELECT = Tab key.
    START  = Enter key.
 
      [JOYSTICK SETUP]
    D-pad   = either digital or analogic inputs.
    B       = button 2.
    A       = button 1.
    SELECT  = button 3.
    START   = button 4.


      2b. Hotkeys and shortcuts
      *************************

      <ESC> Swap to GUI/back to gameplay.
            While in the GUI (menubar active), the emulation is paused and
            the following shortcuts can be used.

                   <Ctrl>+X - Quit program.
                   <Ctrl>+L - Load ROM.
                   <Ctrl>+G - Game Genie codes.
                   <Ctrl>+P - NES palette viewer.
                   <Ctrl>+F - File information.

      <Alt>+<Enter> switches between fullscreen and windowed modes.
      <"> (tilde) - fast forward (if your PC is fast enough for it).
                  * NOTICE! It's disabled in triple buffering mode!

      <F1> Toggles FPS display.
      <F2> Save state.
      <F3> Slot select, up to 15 (extensions rs0, rs1, rs2... rs9, rsa, rsb... rsf).
      <F4> Restore state.
  
      <F5> Soft reset, hold <shift> for hard reset.
      <F6> DiskSystem disk swap (set side B).
      <F7> DiskSystem insert/eject.
      <F8> Insert credits (VS UniSystem only).
  
      <F9> Movie recording.
     <F10> Movie play.
     <F11> Quit to OS.
     <F12> Screenshot (PPU output), hold <Shift> to snap the entire screen.

      key <1> - Reset screen size to the original size (256x240).
      key <2> - Screen size select: 240p, 480p, 720p, 960p and 1080p.
      key <3> - Aspect ratio select: 1:1 pixel, NTSC sqaured or 4:3 VGA.
      key <4> - Toggle scanlines on/off.
      key <5> - Color style select, hold <Shift> to go backwards.
  
      2c. Input devices
      *****************

      The PC keyboard is the default input device for playing NES games. You can plug-in
  an USB joystick to play, or even a mouse for fun.
      Configuration at [Options]->"Input devices".

      |> disabled..: Not a good idea to disable player 1 though.
      |> keyboard..: Default setting.
      |> joystick 1: First joystick setup. Toggle the GUI to detect a hotplug.
      |> joystick 2: Second joystick setup.
      |> mouse.....: Move the mouse for up/down, left/right, clicks for buttom presses.

      About the mouse input, it mimics the joypad while moving/clicking. In the configuration,
  you can change buttons or adjust the sensitivity to movement, in frames. The default is zero
  latency, the maximum is 60. Joypad keys are mapped as follows:

         Up/down/left/right = mouse moving.
         B = left click.
         A = right click.
         Select = mouse scroll (wheel between buttons).
         Start = middle buttom (if available). 

 [==========================================================================]

    +------------------+
    | 3. Using the GUI |
    +------------------+

   * NOTICE! If your video resolution is lower than 480 pixels, the mini GUI bar is activated.
   * All the descriptions below are for the main GUI menubar!

      3a. Drop-down menus
      *******************

           [  Game   CPU   Video  Misc  Options  ?  ]

      - The GUI bar appears once you launch the emulator, or by pressing <ESC> during the gameplay.
      - Let's give a look at its drop down menus and options.
 
           [ |Game|  CPU   Video  Misc  Options  ?  ]
             +-----------------+ 
             | Load ROM        | File select (supported: NES,NSF,FDS,ZIP,GZ).
             | File info       | View header/file info.
             +-----------------+
             | Save state      | Save your progress.
             | Restore state   | Restore your progress.
             +-----------------+
             | Take screenshot | Save a screenshot (bitmap BMP).
             | Sound recorder  | Record the emulator sound output in a WAV file.
             | Quit            | Closes the program.
             +-----------------+


           [  Game  |CPU|  Video  Misc  Options  ?  ]
                    +------------------+
                    | Reset            | Soft reset.
                    | Hard reset       | Hard reset, power off->on.
                    +------------------+
                    | PRG disassembler | PRG ROM disassembler and CPU state.
                    | Set address      | An alternate where you can specify an address.
                    | View CPU state   | The current state of the CPU (registers).
                    +------------------+
                    | Memory dump     >+--------------+
                    +------------------| RAM          |  (*.ram) NES RAM memory $0000-$07FF.
                                       | WorkRAM/SRAM |  (*.wrm) Battery data (read below).
                                       +--------------+
                                       | $6000-$7FFF  |  (*.p67) RAM at $6000-$7FFF
                                       | $8000-$9FFF  |  (*.p8f)-- 
                                       | $A000-$BFFF  |  (*.paf)  \
                                       | $C000-$DFFF  |  (*.pcf)   > PRG ROM banks.
                                       | $E000-$FFFF  |  (*.pef)__/
                                       +--------------+
                                       | PRG ROM      |  (*.rom) Program ROM data.
                                       | CHR ROM      |  (*.chr) Character ROM data (graphics).
                                       +--------------+
                                       | CHR RAM      |  (*.ppu) Character RAM data.
                                       +--------------+
                                       | Palette RAM  |  (*.plt) Color look-up table $3F00-$3F1F, 32 bytes long.
                                       | Nametables   |  (*.nam) Tiles and color attributes, 4 x $400 bytes.
                                       | Sprites      |  (*.oam) Also known as sprite RAM, 256 bytes long.
                                       +--------------+

           [  Game   CPU  |Video| Misc  Options  ?  ]
                          +------------------------+
                          | Game screen size       | Select the screen size (blitter).
                          | Set screen resolution  | Select a custom fullscreen/windowed size.
                          | Use desktop resolution | Use the current desktop resolution for fullscreen.
                          +------------------------+
                          | Load wallpaper         | Select a wallpaper (bitmap) to be used in background.
                          | Remove wallpaper       | Remove the current wallpaper.
                          +------------------------+
                          | Buffering method       | Select triple or double buffering.
                          +------------------------+

           [  Game  CPU  Video |Misc| Options  ?  ]
                               +------------------+
                               | Movies...       >| movie stop, play, status (joypad data log).
                               | Palettes...     >| Palette files, system colors.
                               +------------------+
                               | ROM corruption   | Used to corrupt a portion of the NES memory.
                               | ROM patch        | Modify a PRG ROM data byte.
                               | CPU memory patch | Modify a CPU memory value at a certain address.
                               +------------------+
                               | Game Genie codes | You can enter up to 10 GG codes.
                               +------------------+


           [  Game   CPU   Video  Misc |Options| ?  ]
                                       +------------------+
                                       | Input devices    | Input device configuration.
                                       | Turbo speed      | Turbo for buttoms.
                                       | Set directories  | Configure directories.
                                       | Set GUI colors   | Choose different color squemes/config.
                                       +------------------+
                                       | Sound settings   | Sound configuration.
                                       | General settings | A couple of other options.
                                       +------------------+

           [  Game   CPU   Video  Misc   Options | ? |] 
                                                 +------------------+ 
                                                 | System info      | Video/audio/inputs.
                                                 | Video info       | Video context.
                                                 | Restore defaults | Restore all the default settings.
                                                 +------------------+ 
                                                 | About RockNES    | Version info and copyright.
                                                 +------------------+ 

      3b. Dialogs and options
      ***********************

      +------------------------------------------------------+
      |  GUI COLORS                                      [X] |
      +------------------------------------------------------+
      |  ( ) black and white            ( ) pink panther     |
      |  ( ) red blood                  ( ) yellow yolk      |
      |  ( ) green tree                 ( ) violet           |
      |  ( ) blue seven                 ( ) saddlebrown      |
      |  ( ) [reverse] black and white  ( ) [reverse] pink   |
      |  ( ) [reverse] red              ( ) [reverse] yellow |
      |  ( ) [reverse] green            ( ) [reverse] violet |
      |  (X) [reverse] blue             ( ) [reverse] brown  |
      |                                                      |
      |  [ ] Set dark grey background [rev].                 |
      |  (X) Use default color for text.                     |
      |  ( ) Use brighter color.                             |
      |  ( ) Use black text.                                 |
      |  ( ) Inverted color for text.                        |
      +------------------------------------------------------|

      * Currently, you can select new colors to the GUI menus only. Dialogs cannot be changed for now.
      * The dark grey background can be enabled in any color mode, but since non-reverse colors use
  white font, well, you'll always get white text. Use it with a reverse color squeme.

      * Brighter color will affect the font color. It's even cooler with a dark background.
      * Black text replaces the default white text in non-reverse color modes.
      * Inverted color works for non-reverse squemes.

      All these settings are saved in the config file "RockNES.ini".


   +------------------------------------------------------+
   |  SOUND SETTINGS                                  [X] |
   +------------------------------------------------------+
   [x] Sound output...........: enable/disable APU sound output.
   [ ] Use stereo mode........: enable a pseudo stereo mode.
   [ ] Use famiclone style....: swap duty cycles.
   [ ] Use unsigned samples...: no high-pass filter.
   [ ] Use interpolation......: an easy sound sample interpolation.
   [ ] DMC reversed bits......: improve the playback in a lot of games!
   +------------------------------------------------------+

   +--------------------------------------------+
   |  GENERAL SETTINGS                      [X] |
   +--------------------------------------------+
   |  [x] Enable KEY TILDE as fast forward.     | *As fast as your PC can perform.
   |  [ ] Disable dirty header detection.       | *Bytes 8-15 must be zeroes.
   |  [x] Ask for confirmation before closing.  |
   |  [ ] Use MMC3 alternate IRQ timing.        |
   |  [ ] Use Acclaim's MC-ACC chip (MMC3 IRQ). |
   |  [x] Set savestate slot to 0 upon RESET.   |
   |  [ ] Print FPS value in screenshots.       |
   |  [ ] Enable motion blur effect.            |
   |  [ ] Use NTSC alternate palette.           |
   |  [ ] Disable PPU left clipping.            |
   |  [x] Use vertical retrace sync.            | *Keep this option enabled.
   |  [x] Set the last accessed folder as main. |
   |  [ ] Always use my last video resolution.  |
   |  [ ] Enable mapper 90 nametable control.   | *Submapper control.
   |  [ ] Skip FDS DiskSystem license screen.   |
   |  [ ] Display % of frames per second.       |
   |  [ ] Force mini-GUI menubar.               |
   +--------------------------------------------+

      3c. Restoring default settings
      ******************************

      - You can either delete the config file "RockNES.ini" or take this GUI option to set ALL
  settings to their defaults. Go to [?]->"Restore defaults". Use this option if you're having
  some kind of annoyance.
      

      3d. Using Game Genie codes (cheating)
      *************************************

      *  Select [Misc]->"Game Genie codes", or press <Ctrl>+G while in the GUI.
      *  Up to 10 codes are supported!

         1. Insert a 6 or 8 chars code and click [DECODE].
         2. If the address and value are OK, click [ADD].
         3. Enable the code at left of the list.

      * Codes can be erased or disabled. Here's how to do it.
         1. Click [CLEAR] to cleanup the decoded stuff, or...
         2. Select a code in the list, click [REMOVE] to delete it.


      3e. The PRG ROM disassembler
      ****************************

      * RockNES brings a 6502 data disassembler (game source code viewer).
      Go to [CPU]->"PRG disassembler".

         +------------------------------------+
         | PRG DISASSEMBLER               [X] |
         +------------------------------------+
         |$8000 *A=90, X=05, Y=00, S=FF, P=A5 |  * PC address and CPU registers.
         |PRG ROM bank 08 [$1C000]            |  * Bank number and cartridge data address.
         |+----------------------------------+| 
         ||8000 78       SEI               ||| 
         ||8001 D8       CLD               |||
         ||8002 A9 10    LDA #$10          ||| 
         ||8004 8D 00 20 STA $2000         |||
         ||8007 A2 FF    LDX #$FF          |||
         ||8009 9A       TXS               |||
         ||800A AD 02 20 LDA $2002         |||
         ||800D 10 FB    BPL $800A         |||        
         ||800F AD 02 20 LDA $2002         |||
         ||8012 10 FB    BPL $800F         |||
         ||8014 A0 FE    LDY #$FE          |||
         ||8016 A2 05    LDX #$05          |||
         ||8018 BD D7 07 LDA $07D7, X      |||
         ||801B C9 0A    CMP #$0A          |||
         ||801D B0 0C    BCS $802B         |||
         ||801F CA       DEX               |||
         |+----------------------------------+|
         | CPU ADDRESS SELECT                 |
         |( )$4000 ( )$5000 ( )$6000 ( )$7000 |
         |(o)$8000 ( )$9000 ( )$A000 ( )$B000 |        
         |( )$C000 ( )$D000 ( )$E000 ( )$F000 |
         |   [REFRESH]  [ SAVE ]  [SAVE ALL]  |
         +------------------------------------+

      * EXAMPLE! Select $8000, click [REFRESH] to update & view the ASM code from CPU $8000-$8FFF.
      The code can be saved to a file by clicking [SAVE].
      * There's another interface where you can specify an address and the source (CPU or cartridge).
  Just go to [CPU]->"Set address".

         +---------------------------------------------------+
         | PRG DISASSEMBLER                              [X] |
         +---------------------------------------------------+
         |  Base address:                                    |
         |   8000___ [Refresh] [x]CPU  [ ]ROM     [Save]     |
         |+---------------------------------+ +------------+ |
         ||8000 78       SEI                | |PC=$8057    | |
         ||8001 D8       CLD                | | A=$90      | |
         ||8002 A9 10    LDA #$10           | | X=$05      | |
         ||8004 8D 00 20 STA $2000          | | Y=$00      | |
         ||8007 A2 FF    LDX #$FF           | | S=$FF      | |
         ||8009 9A       TXS                | | P=$A5      | |
         ||800A AD 02 20 LDA $2002          | |            | |
         ||800D 10 FB    BPL $800A          | |$6000 = $FF | |
         ||800F AD 02 20 LDA $2002          | |$8000 = $00 | |
         ||8012 10 FB    BPL $800F          | |$A000 = $01 | |
         ||8014 A0 FE    LDY #$FE           | |$C000 = $02 | |
         ||8016 A2 05    LDX #$05           | |$E000 = $03 | |
         ||8018 BD D7 07 LDA $07D7, X       | |            | |
         ||801B C9 0A    CMP #$0A           | |            | |
         ||801D B0 0C    BCS $802B          | |            | |
         ||801F CA       DEX                | |            | |
         |+---------------------------------+ +------------+ |
         +---------------------------------------------------+
         - Select [CPU] to disassemble from CPU space ($0000-$FFFF).
         - Select [ROM] to disassemble from cartridge ROM space.
         - Click [SAVE] to write the disassembled code into a text file.

      * You can view the CPU state (registers) by selecting [CPU]->"View CPU state".
      An option to save to a text file is also available.

 [==========================================================================]
 
      +----------+
      | 4. Video |
      +----------+

      * All video modes are provided by Allegro. It lists DirectX and a few unusual modes.
  It's recommended to select the "*_AUTODETECT" modes, unless you know what you're doing.
  The framerate should stay at 60 FPS using vertical retrace for a smooth scrolling. 
      * An alternate mode is available via Windows timer, but in various PC machines, the
  framerate stayed around 50Hz for no reason. ~_~;;
      * In a few specific video modes, the screen is either stretched to the monitor aspect
  ratio (usually 16:9), or centered-squared. It's a non-native video resolution, hence all
  the PPU output aspect ratios (see below) will NOT be in "true form", but distorted too.

      * Triple buffering is an alternative method of buffering the game screen. It works only
  in full screen, and 3 surfaces are used. Enable it at [Video]->Buffering method. A restart 
  is required for changes to take effect.


      4a. Screen size (upscalers)
      ***************************

      * The NES PPU outputs at 256x240 pixels, but in most old NTSC CRT TVs, the top/bottom
  8 lines are not visible, so only 256x224 pixels are visible. RockNES displays all the lines.
  You can resize the game screen by pressing key <2>. Available modes:
                
            2x (480p), 3x (720p), 4x (960p) and 4.5x (1080p).

      * Notice that you can't go bigger than the current video height. ^_^;;
      * If there's an incompatible scenario, the blitter is set to 256x240 (1x).

      KEYS:  * Press <2> to cycle between upscalers.
      -----  * Press <3> to change the aspect ratio: 1:1 pixel, NTSC squared or 4:3 VGA.
             * Press <4> to toggle scanlines.


      4b. Setting up a video resolution
      *********************************

      1) Go to [Options]->General settings, and checkmark "Always use my last video resolution" 
  if you want to keep this setting after quitting the program.
      2) Go to [Video]->Set screen resolution. Pick a driver (suggestion: "DirectDraw accel"),
  then select a resolution on the right column.
      3) Accept the risk and click [OK]. ^_^;;

      * The best way of setting up a fullscreen mode that matches your monitor:

      1) Go to [Video]->"Use desktop resolution".
      2) A message will warn you about the upcoming video mode (X/Y size), but the game screen is
  reset to 256x240 pixels for safety.
      3) Click [OK] and you should get fullscreen mode using your current resolution.


      4c. Custom fullscreen mode
      **************************

      * If you don't want to use the Allegro's video selector, here's how to do:

      1) Open the file "RockNES.ini" (configuration file).
      2) Scroll down to the bottom of the file until you find "CUSTOM FULLSCREEN RESOLUTION".
      3) Set the option "-force_video_resolution" to 1.
      4) Set your desired video resolution X Y at "-custom_video_resolution".
         * NOTE: it's for fullscreen only. Windowed modes will always use the blitter setting.


      4d. Wallpapers
      **************

      * You can pick up a bitmap image to be displayed in background while in fullscreen!
      * Go to [Video]->"Load wallpaper" to select a BMP file.
      * To remove it, just select [Video]->"Remove wallpaper".


      4e. Palettes
      ************

      * RockNES uses RGB palettes of 24-bit. The built-in was replicated from the PSX game
 "Rockman Complete Works" and the missing entries were filled up using a palette provided by
 Chris Covell. However, the default NTSC palette was created using a generator by Joel Yliluoma.

      - The built-in palette is much more saturated with vibrant colors.
      - The NTSC palette is much less saturated, less bright and red tones are mostly wine tones.

      * You can use your custom NES palette! Files must be 192 bytes long, within 64 RGB triplets
  of 24 bits. Color emphasis entries are NOT required, since they're auto generated. 

      # To load a palette file, go to [Misc]->"Palettes..."->"Load palette".
      # If you want to save the current palette, go to [Misc]->"Palettes..."->"Save palette".
  This option is used when you want one of the RockNES built-in palettes. ^_^;;

      NOTICE!
      - RockNES supports VS Unisystem games, and these titles requires a specific palette, since
  they use a slightly different hardware set. Unfortunately, the emulator cannot auto-select a
  palette, so you must do it manually. Two options are available:
        * VS palette tables: select by game title (reference only). We have 11 titles.
        * VS RGB palettes..: select a palette that best fits your current loaded game.
         

      4f. Color styles
      ****************

      * You have 32 color styles! Press key <5> to cycle through them.

     0. NES default.............: the NES palette.
     1. RGB fix.................: usually "kills" light cianos, light browns or magenta color tunes.
     2. GameBoy #1..............: Game Boy 4 shades of green. Uses the brighness level ANDed with $C0.
     3. GameBoy #1 (alt)........: Same palette, but uses a color index table.
     4. GameBoy #2..............: Alternate Game Boy green, but uses multiply blending.
     5. GameBoy #3..............: Another GB color set. Uses the brighness level ANDed with $C0.
     6. GameBoy #3 (alt)........: Same palette, but uses a color index table.
     7. GameBoy #4..............: Game Boy 4 shades of gray. Uses a color index table.
     8. Black & white...........: 2 colors with a twist for better results.
     9. Black & white (negative): Negative B&W.
    10. Red emphasis............: deemphasis green and blue.
    11. Green emphasis..........: deemphasis red and blue.
    12. Blue emphasis...........: deemphasis red and green.
    13. Grayscale #1............: monochrome.
    14. Grayscale #2............: monochrome with brightness correction.
    15. Grayscale #2 (negative).: negative monochrome.
    16. Sepia #1................: monochrome orange tones.
    17. Sepia #2................: dark orange emphasis.
    18. Mushroom................: shifted colors.
    19. Royal Yellow............: shades of yellow.
    21. Red Spain...............: shades of red.
    22. Green Plant.............: shades of green.
    20. Blue Navy...............: shades of blue.
    23. Magenta.................: shades of magenta.
    24. Olive...................: a cool green color filtering.
    25. Nocturne................: blended red and blue.
    26. Sketch..................: high brightness grayscale.
    27. [B-G-R] SET.............: reversed RGB components.
    28. [B-R-G] SET.............: uses blue, red and green order.
    29. [G-R-B] SET.............: uses green, red and blue order.
    30. [G-B-R] SET.............: uses green, blue and red order.
    31. [R-B-G] SET.............: uses red, blue and green order.  

 [==========================================================================]

      +----------+
      | 5. Sound |      [Options]->"Sound settings"
      +----------+ 

      5a. Description and default settings
      ************************************

      - The NES APU (sound unit) is fully supported. The generated output is downsampled to
  44100Hz, 16-bit. Default is mono mixing. Sound is enabled bu default. In order to disable it
  (muting), go to [Options]->"Sound settings" and uncheck "Enable sound output". Other options
  include a pseudo stereo mode - the NES channels are separated at left/right.
      - The emulator uses an high pass filter to generate signed samples from the unsigned
  buffer. In the "sound settings", checkmark "Use unsigned samples" for a pure/unfiltered NES
  sound output. By changing the sound mode mono/stereo, there's no need of an emulator restart.
  There's an option for a more muffled sound and higher bass - checkmark "Use interpolation".
      - A few games bring PCM/DMC channel. The playback is improved if you checkmark the option
  "DMC reversed bits". ^_^;;


      5b. Playing NSF chiptune files
      ******************************

      - NSF is chiptune music, either ripped from games or sequenced by a tracker.
      - When playing a tune, coloured circles are drawn in black background.
      = SPOILER: color styles are supported in this mode.

        +-----------------------------+         
        |  COLOR     |  NES CHANNEL   |
        +-----------------------------+
        | dark blue..: pulse wave #1  |
        | light blue.: pulse wave #2  |
        | red........: triangle wave  |> NES APU
        | white......: noise wave     |
        | green......: DMC playback   |
        +-----------------------------+
        | dark pink..: VRC6 square #1 |
        | light pink.: VRC6 square #2 |> VRC6 sound (extra channels)
        | orange.....: VRC6 sawtooth  |
        +-----------------------------+---------------------------+
        | 8 shades of yellow are used for the Namco 163 channels. |
        +---------------------------------------------------------+

        * Keyboard arrows change tracks.
        * Press <ENTER> to (re)play the current track.
        * Savestates (F2) and fast forward are supported in this mode.
        * There's no way to stop the playback, but halt it by hitting <ESC>.
        * The playback is always at 60 Hz, PAL songs will be played in lower tones.

        NOTICE!
        - If a NSF file crashes right on playback, it's probably an IRQ being fired. Some files
 writes $C0 to $4017, enabling frame IRQs.

      5c. Recording WAV files
      ***********************

      You can record the sound output in WAV files. Go to [Game]->"Sound recorder". You will
  be prompted to start the recording. If no game is loaded, the file is named "record.wav" and
  recording starts right after the ROM loading & run.
      If a game is already loaded & running, the WAV file has the "Game tile - 000.wav" format.
  Up to 999 files can be saved for each game. ^_^;;

  *NOTES! IF you "forgot" an active recording, don't worry. RockNES will finish it to you.
  Changing the sound mode will stop the current active recording too.

 [==========================================================================]

      +---------------------------------+
      | 6. Movies (joypad data logging) |
      +---------------------------------+

      6a. Introduction
      ****************

      This feature records data from both joypads in each PPU frame, or 2 bytes at
 every 1/60th second. When this data is restored frame by frame, it mimics your gameplay,
 so we called it... "movies". It's NOT video data like a MP4 or AVI file.


      6b. How to record and play movies
      *********************************

      During the gameplay, select a slot using the key <F3>. We have 15 slots. ^_^;;
  Press key <F9> to start a movie recording. All your keypresses will be saved.
      Once you finished it, just press <F9> again to stop the processs. A message is
  displayed at the bottom left of the screen.
      If you want to play your movie, press key <F10> and watch your gameplay again.
  Once finished, a message will be displayed. You can press <F10> again to interrupt it.

  * NOTE! Don't worry. If you quit the emulator, your progress is saved automatically.


      6c. Saving states during a movie
      ********************************

      This feature is available from RockNES 5.67. During the gameplay recording, you
 can save your progress... and then restore it! The movie will be resumed from the
 savestate point. It's a nice feature to record gameplays with certain perfection. ^_^;;
 Note that the initial movie savestate isn't affected.

      * Press <F2> to save, <F4> to load.
      * Once a movie is in progress, it's NOT possible to change the slot number! Be sure
 to select a free slot using <F3> BEFORE starting a movie.

 [==========================================================================]

      +--------------+
      | 7. Savestate |
      +--------------+

      7a. Introduction
      ****************

      - It's the ability to save (and restore) your progress in the game at any time.
 We called it "savestate". A RockNES savestate file has the extension .RS0, .RS1, .RS2
 up to RSF (hexadecimal) for each one of the 15 slots available.

      7b. Operations and controls
      ***************************

      * First, you need to select a free slot to use! Just press key <F3> to select it.
      * Press key <F2> to save your progress.
      * Later, press key <F4> to restore your progress.
      - Using the GUI, these options are found at [Game]->"Save state" and "Restore state".

       
      7c. File format and general info
      ********************************

      - The first 4 bytes of the file must be RSX7. The number is the file version, currently 7.
  We have 15 slots available, so 15 files (savestates) can be created, as descripted before.
  File extensions are:
     [RS0, RS1, RS2, RS3, RS4, RS5, RS6, RS7, RS8, RS9, RSA, RSB, RSC, RSD, RSE, RSF]

      * For the details of the file structure and tagged blocks, please, read "savestate.txt"
  included in this package.

 [==========================================================================]

      +--------------+
      | 8. Hardwares |
      +--------------+

      8a. NES (stands for Nintendo Entertainment System)
      **************************************************

      - RockNES emulates the NES videogame released in North America in 1986 (NTSC). The hardware
  is fully emulated. The PPU emulation doesn't fully mimic the original set of fetching/rendering.
  All the ROM tests should get a PASS without internal hacks or tricks.
      - The main mappers (MMC1, MMC3, MMC5 and others) are fully supported. A few cartridges from
  Japan (Famicom hardware) might be partial. The emulator accuracy level is very high, a product
  of working on it since 1998. ^_^;; The source code is quite simple and optimized. The speed in a
  Intel Core i5 running at 1x size (mapper 0) should reach 350 FPS.


      8b. VS Unisystem and PlayChoice10
      *********************************

        Games must be in iNES format. Support is partial, you must select a palette that matches the
  current loaded game. For informations, see section "4e. Palettes".
        
  * VS Unisystem is emulated as mapper 99 and 151.
    - Press <F8> to "insert credits". DIP switches are not supported.
  * PlayChoice-10 requires no special changes. Only the upper monitor is NOT emulated (instructions).

    "The Nintendo VS Series was a series of arcade video games designed for two player
  competitive play using the VS. UniSystem or VS. DualSystem, arcade system boards
  based on the Nintendo Entertainment System. Many of these stand-up or sit-down
  arcade machines had two screens and controls joined at an angle. These games were
  arcade ports of home video games for the Nintendo Entertainment System, thus they
  could be sold cheaply to arcades in the late 80s".
                             http://en.wikipedia.org/wiki/Nintendo_Vs._Series/

    "PlayChoice-10 is an arcade machine that can consist of as many as 10 different games
  previously available only on the Nintendo Entertainment System (NES) home console. The
  games for this system are in the modular form of circuit boards that are plugged into
  one of the ten open slots on the PlayChoice-10's motherboard".
                             https://en.wikipedia.org/wiki/PlayChoice-10
 
  
      8c. Famicom Disk System
      ***********************

        It's a peripheral for the Nintendo Family Computer console (Famicom) in Japan.
 It was a unit that used proprietary floppy disks called "Disk Cards" for data storage.
 Currently, the disk images were poorly dumped, missing important data.
        The emulation requires the file "disksys.rom" (not included). Supported files
 have the FDS extension. The driver is emulated as "iNES mapper 20" with partial support.
 No extra sound channels are emulated yet.
        Once a game is loaded, the BIOS initializes the system. When the game title screen
 appears, you might be prompted to switch the disk side.
        * Press <F7> to eject the disk, then <F6> to change the disk side (A->B).
        * Press <F7> again to insert the disk.       

 [==========================================================================]

      +-------------------------------+
      | 9. CREDITS (no special order) |
      +-------------------------------+

  gcc (MinGW.org GCC Build-2) 9.2.0
  Copyright  Free Software Foundation, Inc.

  The Dev-C++ resource site
  http://www.bloodshed.net/dev

  Orwell Dev-C++ - the main site of the 2011 Dev-C++ fork
  http://orwelldevcpp.blogspot.com.br/

  Allegro library, by Shawn Hargreaves
  http://alleg.sourceforge.net/

  Joel Yliluoma
  https://bisqwit.iki.fi/utils/nespalette.php

  unzip.c - IO for uncompress .zip files using zlib
  Copyright  Gilles Vollant

  Quietust
  http://www.qmtpro.com/~nes/nintendulator/

  Marat Fayzullin
  http://fms.komkon.org

 [=========================================================================]
EOF
