
                               R o c k N E S
                          A NES videogame emulator
-looking for a giant ASCII artwork... ^_^;;
  <<======================================================================>>
                             (c)1998-2008 Fx3
                        Win32 version 5.00 beta 7
                            February 25th 2007
                          Freeware, for home use
                         http://rocknes.kinox.org
  <<======================================================================>>

   LICENSE AGREEMENT:

   - This is free software, for home use only.
   - No warranties, so you take the risk. 
   - ROM images cannot be distributed with this software.
   - Please, don't bother me if you messed up the things, ok?
   * If you disagree with these terms, DELETE THIS SOFTWARE NOW.

   HARDWARE REQUIREMENTS:

   - The NES emulation uses cycle precision, pixel by pixel rendering.
   - You need a 1GHz CPU processor. RockNES isn't aimed for old machines.
  --------------------------------------------------------------------------
    ----------------------------------------------------------------------  

** NOTICE ** This is beta version, might be unstable or buggy.

 What's new for version 5.00 BETA 7 (02/25/2008)
 -----------------------------------------------
 - Major CPU and APU timing fixes, hard work.
 - Fixed sound config GUI dialog.
 - Cleanups, future savestates might not be compatible.
 - Lots of minor changes and improvements.

 [==========================================================================]
   Read 'oldnews.txt' for a complete history of updates.
 [==========================================================================]

 1. Description
 2. Configurations and default controls
 3. Using the GUI + Game Genie.
 4. iNES file format description.
 5. VS Unisystem games.
 6. "What is a NES mapper?"

 [==========================================================================]
   KNOWN EMULATION ISSUES (up to 5.00 beta 6):

 - Some modern videocards applies video filtering on fullscreen modes, hence
the image can appear stretched and with blurry scanlines. This issue doesn't
happen on windowed modes though.
 - Press ENTER during the emulation if the ESC key (GUI access) looks blind.
 - Depending of your sound settings, expect some latency or skips.
 - Mapper 4 (MMC3) is enabled again, but since IRQs are disabled, most of the
games are unplayable.
 - Due to the sprite core rewrite, some games can be flickering for some reason.
 - Game Genie driver is not perfect, probably broken somewhere.
 - Better PPU emulation is required to match the hardware fetches.
 - Famicom Disk System (mapper 20) driver is broken.
 - Mapper 4 IRQs (MMC3 and variants) are NOT supported, unfortunately.
 - Mappers 9 and 10 are glitched in the right side of the screen.
 - Some pirated mappers are not perfect.
 - Some official mappers can be broken due to lack of proper testing.
 - A garbaged scanline can appear in a few games due to a PPU timing failure.
 - The game Battletoads (mapper 7) can freeze during the stage 2.
 - Video refresh rate is perfect (60Hz), but the sound isn't yet.
 - The RockNES GUI can fail if running in windowed mode (blind mouse pointer).

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

 1. Description
 --------------
 > This software emulates the Nintendo Entertainment System (NES) videogame.
 > RockNES is fully coded in C language and uses the Allegro library.

 * Emulated hardware *

   - 2A03 CPU emulation, a 6502 variant, using cycle precision timing.
   - 2C02 PPU emulation, using a generic pixel by pixel rendering.
   - Joypads 1 and 2.
   - Accurate pAPU sound emulation: squares, triangle, noise and DMC.
   - Konami's VRC6 sound chip used in 'Akumajou Densetsu' and 'Madara' games.
   - Preliminary Famicom DiskSystem driver.
   - VS-Unisystem is partially emulated, iNES format only.
   - Backed battery, saved to harddisk.
   - Supported iNES mappers 0,1,2,3,4,7,9,10,11,13,15,16,18,19,20,21,22,23,24,
   25,26,32,33,34,40,41,42,43,44,57,64,65,66,67,68,69,70,71,72,73,75,76,78,79,
   83,85,88,90,91,92,94,97,99,100,101,110,113,117,118,119,151,160,180,184,187,
   189,225,226,227,228,229,230,231,232,233,234,235,240,243,246 and 255.

 NOTES: 1. Famicom DiskSystem emulation (as mapper #20) requires the BIOS file
        named 'disksys.rom'.
        2. RockNES uses a custom RGB palette taken from Rockman Complete Works,
        and a few 'holes' filled up using Chris Covell's palette as reference.
        3. I have no interest to emulate mapper #5 (MMC5, CastleVania 3).
        4. The PPU rendering needs a fix, in order to match the NES sequence.

   > Other features available:
   ---------------------------
    - PPU color emphasis and monochrome modes.
    - Accurate sprites rendering.
    - Joypad data logging, known as "movies".
    - Savestates.
    - NESticle savestates loading (.STA files).
    - GUI and config file.
    - Game Genie codes.
    - Realtime ROM data patching.
    - Sound recording using WAV format.
    - 6502 disassembler.
    - Optional channel separation (stereo) sound output.
    - PPU image blitter stretched at 640x480, pixelated, scanlined or stretched.
    - PPU image blitter at 512x480, normal, pixelated or scanlined.

 * Unemulated hardware *

 - Illegal CPU opcodes.
 - European NES console (PAL 50Hz) and (sort of) japanese Famicom.
 - Input devices like the Zapper (light gun), Power Pad and others.
 - Joypads 3 and 4.
 - VS-Dualsystem.
 - Playchoice-10 upper monitor (z80 emulation).
 - More extra sound chips.

 > NOTES:
 ********
  - RockNES has ZIP file loading.
  - You can record your gameplay. The joypad states are saved to disk, so the gameplay
can be exactly reproduced.
  - Game Genie codes are supported.
  - When first run, RockNES creates a config file named 'rocknes.ini'. There are lots
of options - open the file using any text editor and have fun.
  - You can dump NES memory:

 # [Menubar] -> CPU -> Dump... -> "RAM",
                                  "Work-RAM"
                                  "CPU $8000-$FFFF"
                                  "CPU registers"
                                  "PRG ROM data"
                                  "CHR ROM data"
                                  "Palette RAM"
                                  "Pattern table"
                                  "Nametables"
                                  "Sprite RAM"

    +---------------------+------------------+---------------+
    | context             | CPU memory range | filename      |
    +---------------------+------------------+---------------+
    | System RAM          | 0000h-1FFFh**    | nes_ram.bin   |
    | PRG ROM data        | ----  ---- ****  | gamename.prg  |
    | PRG RAM data        | 8000h-FFFFh#     | gamename.p8f  |
    | Work RAM***         | 6000h-7FFFh      | nes_wram.bin  |
    +---------------------+------------------+---------------+
    ** It uses 3x800h blocks mirroring 0000h-07FFh.
    *** Known as backed battery.
    **** The entire PRG data is dumped.
    # The PRG data loaded at 8000h-FFFFh is dumped.

    +---------------------+------------------+---------------+
    | context             | PPU memory range | filename      |
    +---------------------+------------------+---------------+
    | CHR RAM data*       | 0000h-1FFFh      | gamename.gfx  |
    | Nametables          | 2000h-3EFFh      | gamename.nam  |
    | Palette RAM         | 3F00h-3FFFh      | pal_ram.bin   |
    | Sprite RAM          | I/O at 2004/4014h| sprites.bin   |
    | CHR ROM data**      | 0000h-1FFFh      | gamename.chr  |
    +---------------------+------------------+---------------+
    * Known as Pattern table.
    ** The CHR data loaded at PPU 0000h-1FFFh is dumped.
 
 # [Menubar] File -> Game Information
    +---------------------+------------------+---------------+
    | context             | Information      | filename      |
    +---------------------+------------------+---------------+
    | iNES header info    | 16 bytes header  | gamename.txt  |
    +---------------------+------------------+---------------+

 # [Menubar] CPU -> Dump... -> CPU registers
    +---------------------+------------------+---------------+
    | context             | Information      | filename      |
    +---------------------+------------------+---------------+
    | CPU registers       | Actual CPU state | cpu6502.txt   |
    +---------------------+------------------+---------------+

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

 2. Configuration and default setup
 ----------------------------------

 > Default keys (by default) are:

    [player 1] - device is KEYBOARD
    UP, DOWN, LEFT, RIGHT  = keyboard arrows
    A      = 'X' key
    B      = 'Z' key
    SELECT = 'Tab' key
    START  = 'Enter' key

    [player 2] - no device assigned (KEYBOARD)
    UP     = 'U' key.
    DOWN   = 'J' key.
    LEFT   = 'H' key.
    RIGHT  = 'K' key.
    A      = 'S' key.
    B      = 'A' key.
    SELECT = 'Q' key.
    START  = 'W' key.

    > Joypads:

    UP,DOWN,LEFT,RIGHT = D-pad
    A      - button 1
    B      - button 2
    SELECT - button 3
    START  - button 4
    Quit Emulator - button 5
    Fast Forward  - button 6

 > Other keys:

 <ESC> - Switch to GUI / back to gameplay.

 <F1>  - toggles Frames-Per-Second display on/off. 
 <F2>  - save state from selected slot
 <F3>  - slot selector to save/load a state (0,1,2,3,4,5,6,7,8 or 9)
 <F4>  - load state from selected slot

 <F5>  - NES soft reset (RAMs are not cleaned)
 <F6>  - FDS disk side flip (A->B->C->D->A...)
 <F7>  - FDS disk insert/eject
 <F8>  - to insert coins (VS Unisystem)

 <F9>  - gameplay logging
 <F10> - gameplay player
 <F11> - unused?
 <F12> - take screenshot

 <KEY_Q> - Quit to OS

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

 3. Using the GUI + Game Genie
 -----------------------------
  (notice that some of the items might be outdated,
   perhaps I'm too lazy for updating them, heh)

 [Main]
  - Load ROM...........: Lists files of extension .NES/.NEZ/.FDS/.BAK/.ZIP 
  - Game information...: Displays iNES header information + CRCs.
  - Screenshot.........: Takes a screenshot (BMP).
  - WAVE logging.......: Record WAV files.
  - Quit...............: Close the emulator.

 [CPU]
  - Reset..............: Emulation reset.
  - Save state.........: Save your progress.
  - Load state.........: Load your progress.
  - Load NESticle state: Load a NESticle emulator savestate.
  - Dump...............: NES memory dumping (lots of options).

 [Misc]
  - Video resolution...: You can change the video card/resolution.
  - Movies.............: Record, play, stop and status of a NES movie.
  - Palettes...........: Set the current palette (for VS Unisystem games).
  - ROM cheat..........: You can patch the loaded ROM data.
  - Game Genie.........: You can enter Game Genie codes (up to 10).
  - ROM Corruptor!.....: Corrupts a certain memory range.

 [Help]
  - System.............: Displays some important system information.
  - About..............: Software version.

        <<--------------------------------------------------------->>
                                GAME GENIE

 > GameGenie codes can be either 6 or 8 digits and use the letters:
    A P Z L G I T Y   E O X U K S V N

// To test game genie 6 char code - SXIOPO    Super Mario 1  Unlimited lives
// To test game genie 8 char code - SXEZSKOZ  Super Mario 3  Skywalker

 > To input a GameGenie code, go to Misc->Game Genie. A small window will
 appear requesting a code, disregarding case (SXEZSKOZ, SxEzSKoz or szezskoz
 are acceptable). Any invalid letter is ignored. Click OK to finish or CLEAR
 to delete all inserted codes.
 > No way to enable/disable a code during gameplay. For 6 chars codes only,
 you must reset the emulation to take effect.

 Note for advanced users:

 > A 6-char GG code will patch data at 8000h-FFFFh on reset only. If a game
 uses bankswitch, there are chances to get an useless code. The 8-char code
 has no problem - it keeps patching whatever appears there.

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

 4. iNES header format
 ---------------------

 > RockNES supports only .NES files within the iNES header created by Marat
 Fayzullin. Here's the format description:

    +--------+------+------------------------------------------+
    | Offset | Size | Content(s)                               |
    +--------+------+------------------------------------------+
    |   0    |  3   | NES                                      |
    |   3    |  1   | 0x1A                                     |
    |   4    |  1   | 16K PRG-ROM page count (size=x*0x4000)   |
    |   5    |  1   | 8K CHR-ROM page count  (size=y*0x2000)   |
    |   6    |  1   | ROM Control lower byte                   |
    |        |      |   %mmmmvTsM                              |
    |        |      |    |  ||||+- 0=Horizontal Mirroring      |
    |        |      |    |  ||||   1=Vertical Mirroring        |
    |        |      |    |  |||+-- 1=Backed battery            |
    |        |      |    |  ||+--- 1=Trainer data (512 bytes)  |
    |        |      |    |  |+---- 1=Four-screen mirroring *   |
    |        |      |    +--+----- Mapper # (lower 4-bits)     |
    |   7    |  1   | ROM Control upper byte                   |
    |        |      |   %MMMM00PU                              |
    |        |      |    |  |  |+- 1=VS Unisystem arcade       |
    |        |      |    |  |  +-- 1=Playchoice-10 arcade      |
    |        |      |    +--+----- Mapper # (upper 4-bits)     |
    |  8-15  |  8   | Filled up with zeroes.                   |
    +--------+------+------------------------------------------+

* If set, then the mirroring flag is ignored.

 Legends:
 ========
 a) PRG-ROM stands for PRoGram ROM, or actual 6502 CPU instructions.
 b) CHR-ROM stands for CHaRacter ROM, or the game graphics.

 Notes:
 ======
 > Check if you're loading a ROM image with a non-corrupted header.
 > RockNES does not support mappers greater than 255.
 > The header brings the game data size. If the real file size does not match
 the size specified in the header, the loading proccess is halted.
 > RockNES does not support cartridge board emulation identified by labels.

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

 5. VS Unisystem
 ---------------

 > The Nintendo Vs. Series (for "versus") 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 1980s.
 (taken from WikiPedia)
http://en.wikipedia.org/wiki/Nintendo_Vs._Series

 * DIP Switches are not supported.

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

   CREDITS (no special order)
   **************************

 NES development community
 http://nesdev.parodius.com

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

 Allegro library, by Shawn Hargreaves
 http://www.talula.demon.co.uk/allegro

 Alastair Bridgewater - Darcnes
 http://www.dridus.com/~nyef/darcnes

 Parodius Networking - website hosting
 http://www.parodius.com

 unzip -- IO for uncompress .zip files using zlib
 Version 1.00, September 10th, 2003
 Copyright (C) 1998-2003 Gilles Vollant

 blargg
 http://www.slack.net/~ant/

 [=========================================================================]
 [=========================================================================]
//eof
