
 -----------------------
  Welcome to year 2000!       "I am the terror that flaps in the night."
 -----------------------                          -Darkwing Duck

   RockNES - A (N)intendo (E)ntertainment (S)ystem 8-bit emulator.
   Copyright (c)1998,1999,2000 -= Fx3 =- version 1.600, 11/24/2000
   LICENSE: Freeware.

   *DOS, Windows (DirectX) and MacOS ports are avaliable!

 ----------------------------------------------------------------------------
   Disclaimer:
   ^^^^^^^^^^^
   - I am not affiliated with Nintendo or any other company, nor advocate
 the piracy of Nintendo games. This software is freeware, for absolutely
 non-commercial use. It may be distribute freely *as is* (non-modified).
 Commercial games cannot be packaged with this emulator.
   - When you use this software you do so at your own risk. The author cannot
 be responsible for any loss or damage resulting from the use or misuse of
 this software. Absolutely no warranty.
   - If you don't agree with these terms, DELETE THIS SOFTWARE NOW.

 ----------------------------------------------------------------------------
------------------------------------------------------------------------------
Compiled with:

DJGPP package
http://www.delorie.com/djgpp/

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

Binary compressed using UPX
http://upx.tsx.org
------------------------------------------------------------------------------
 ----------------------------------------------------------------------------

   Warnings before you contact me:
   
 => Do not send stupid questions.
 => Do not send/request *anything* (pirate stuff, ROMs or junk).
 => Do not ask me 'how-to-use' RockNES.
 => Do not ask 'how to write/start' anything (like emulators).
 => Do not ask about future versions of anything, ever.
 => Do not ask me where do you find games (maybe in old cartridges stores?).
 => Do not expect to get it working good in your machine "automatically".
 => I *cannot* add netplay, so stop asking for support. However, if you have a
 time (interest) to write a driver, please, contact-me.
 => If you do not like RockNES, so try a real NES.
 => If your pretty joypad (Sidewinder or any other) does not work, I can do
 nothing, sorry... I use Allegro's input stuff directly.
 => _READ_ this doc fully before "it's very slow in my Pentium 1000 GHz".

 RockNES is tested _hardly_ before each release.
 However, I'm not powerful enough to detect/fix ALL problems and bugs.

 ----------------------------------------------------------------------------
 There are tons of bad dumps, most of them with junk in the header. Use a
 good tool to fix them... However, if after all it fails, so submit me the
 game information (an easy text file with the game title, mapper and a shorty
 problem description). Ah, if the mapper is not supported, send me docs.
 ----------------------------------------------------------------------------

   WHAT'S NEW:
   -----------

Version 1.600 (11/24/2000)
 - Added a ppu tile caching system, sped up the things;
 - Added a decent savestate format -- NOT compatible with the old ones;
 - Added a new method for noise luts, much clean;
 - Added mapper #180 (Nichibutsu, game Crazy Climber supported);
 - Added preliminary VS UniSystem reads handler (Atari RBI Baseball works),
thanks to xodnizel;
 - Added a cheap hack to get Paris-Dakar Rally Special working (map66);
 - Fixed a major bug in the mapper #40 (SMB2j) reset;
 - Fixed mapper #83 CHR bankswitch (World Heroes2 works);
 - Fixed mapper #232 (BF9096 chip - used by Codemasters' Quattro carts);
 - Fixed mapper #233 (the '20-in-1' half works, 'reset' to active);
 - Fixed nametables dumping (dumping the entire $400 data in a .nam file);
 - Fixed major problems in the sound startup routines;
 - Fixed number of cpu cycles per sprite DMA transfer;
 - Fixed ppu layout (frame starts at VBlank);
 - Fixed ppu latch system and ppu reads, thanks to Ki for his findings
(pass ok in the tests programs).
 - Fixed mirroring state saving (when a mapper uses a custom mirroring);
 - Tweaks in the FDS driver, more games are working;
 - Cleaned up the 16k CHR RAM support code, used by mapper #13;
 - Expanded ROM information display;
 - Whoops, removed "dump pattern addresses" option from GUI;
 - General cleanups to boost the performance;
 - Added a 'secret' mapper, I will tell you later... ;-)

 Note: if you want to check out past changes, feel free to edit 'oldnews.txt'.

 [==========================================================================]
   Index

 1. RockNES description/features
 2. Configuration and default controls
 3. Using the GUI
 4. iNES file format description
 5. VS Unisystem games
 6. "What is a NES mapper??"

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

 1. RockNES description/features
 -------------------------------

    This piece of software is a Nintendo Entertainment System 8-bit (NES)
 videogame emulator for PC machines. I wrote it 'cause the NES is/was my
 pretty videogame. Notice that the NES is +- 18 years old! :-)
    RockNES 0.99 is a full rewrite of original RockNES (old xNes). It was
 designed to be very compatible and as fast as possible.

    Currently, the following things are emulated:
    ---------------------------------------------

 - NES 2A03 CPU emulator by Matthew Conte;
 - Full NES 2C02 PPU emulation with scanline gfx engine;
 - NES I/O (such as joypads);
 - Sound emulation (all the 5 channels and Konami VRCVI sound);
 - Palette (very closed to real NES);
 - Color emphasis used by some games and NES demos;
 - Monochrome mode;
 - Save RAM (backed battery, if present or used by a game);
 - Mappers: 0,1,2,3,4,5,6,7,8,9,10,11,13,15,16,17,18,19,20,21,22,23,24,25,26,
 32,33,34,40,41,42,43,64,65,66,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,151,160,180,184,187,189,225,226,227,228,
 229,230,231,232,233,234,240,246 and 255.
 Most of these 80 mappers have full support.
 Note: If you want to get emulated a non-listed mapper, send me docs.

    The following extra hardware are emulated as well:
    --------------------------------------------------

 - Konami's jap. VRCVI sound hardware emulation (Akumajou Densetsu/Madara);
 - VS Unisystem arcade machines (missing linked-system) in iNES format,
 emulated as mapper #99;
 - Famicom DiskSystem, emulated as mapper #20. To play games, you'll need FDS
 images and the BIOS 'disksys.rom' in the same dir, where you placed RockNES.
 Find it by yourself, do not request it.

    The following extra features are added:
    ---------------------------------------

 - NES Movies (*.RMx files, x=0..9);
 - Save states (*.RSx files, x=0..9);
 - NESticle saved states (*.STA,*.STx files) loading;
 - A basic GUI;
 - EAGLE effects.

    The following extra features are missing (most of them due the rewrite):
    ------------------------------------------------------------------------

 - NES PAL hardware;
 - Any kind of external device such as PowerPad, Zapper and others;
 - VS Unisystem arcade machines with linked-system;
 - Game Genie codes (when ready, they'll return);
 - Famicom DiskSystem sound hardware, and others.

 Here some notes:
 ================

 * About the speed and requirements:
 -----------------------------------

 Strongly recommended:
 - Pentium 200Mhz, with 8Mb of RAM (I didn't try on 4Mb);
 - A SoundBlaster soundcard or 100% compatible for sound;
 - Around 500kb free on hard disk;
 - VESA support would be nice...
   (go to http://www.scitechsoft.com/ and look for Scitech Display Doctor).

   * Some videoboards (like my ATI mach64) may have their own VESA tsrs
   (in the case, I use 'm64vbe.com' to enabled VESA support).


 * About the NES Movies:
 -----------------------

 - You can record your gameplay. This mean you can record your gameplay! :P
 Data is written in 2 blocks:

 -block 1- saved state.
 -block 2- byte 1 is joypad_1 data, byte 2 is joypad_2 data ("word"), repeat
 until eof.


 * About the ROM cheat:
 ----------------------

 - 'Cheat' is not an high priority right now. This new feature will cheat the
 ROM portion of your game. Since this block is 'read-only', cheat is possible
 with the same emulation performance (speed). You have a window where you can
 enter an ROM address (valid) and a value (0-255). Be careful while cheating.
 It's fun if you know how to handle this feature. You cannot save the changes
 to avoid ROM damage (use a pen + paper to take notes of your results).


 * About NESticle saved states:
 ------------------------------

 WARNING: NESticle is an old and crappy emulator.
 "Anything that extends the life of NESticle is evil".
 So, don't expect better support for STA files.

 - It's possible to load NESticle saved states. It does not work 100% good...
 but it works with a lot of games. Valid files have the "*.STx" extension, of
 x='A', 1, 2... 9. The state file must to be at same folder with the game.


 * About dumping:
 ----------------

 - Click *CPU->Dump item to access a little menu. You can dump CPU registers,
 pattern table ($0000-$1fff PPU area), VROM data and current color palette...
 The first half of patterns ($0000-$0fff) is saved as 'pat_tbl1.dmp', and the
 second half ($1000-$1fff) as 'pat_tbl2.dmp', sprites or background tiles. It
 is fun. CPU registers are dumped as 'nes6502.dmp', normal ascii text file of
 CPU values (not binary I meant). The same with color dump ($20 values) saved
 as 'palette.dmp'. All these values are saved at end of V-Blank (scanline 262
 and ready to start the next frame, line zero). The current directory will be
 used to save some of these files (the folder you placed RockNES binary).


 * About command line:
 ---------------------

 - RockNES does not support any command line switches.


 * About configuration file:
 ---------------------------

 - A file named 'rnsetup.cfg' is created automatically when not found in the
 current directory. Edit this file used any text editor (ms-edit or notepad)
 to see the options you can change, enable, disabled...

 - In the config file (rnsetup.cfg), you have an option to setup a default
 directory for ROM images (like c:\mygames). 

 - EAGLE effects (in a set of bitmap blitters) can se set in the config file.

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

 2. Configuration and default controls
 -------------------------------------

    Running RockNES by first time, a config file is generated at current
 directory, this file is named 'rnsetup.cfg'. It's always restored if not
 found. It's very commented, I suggest you to edit it for more help. You're
 able to setup video, sound, inputs and more.
    During the emulation, keys work as following:

 <ESC> - Swap to GUI (emulation is halted) / back to game.

 <F2>  - Save state (*.RSx, x=0..9 is the current slot).
 <F3>  - Slot selector (0..9 -> 0..).
 <F4>  - Load state.

 <F5>  - Soft Reset.
 <F6>  - FDS disk side change (A->B->C->D->A...).
 <F7>  - FDS disk insert/eject.

 <F9>  - Movie record (again to stop).
 <F10> - Movie play (again to stop).
 <F12> - Save a screenshot (.PCX).

 KEY PLUS PAD  (+) - increase frameskip (default=0, limit=9).
 KEY MINUS PAD (-) - decrease frameskip.

    [player 1] - input is KEYBOARD1 (setup 1)
    UP, DOWN, LEFT, RIGHT = keyboard arrow keys.
    A = 'X' key.
    B = 'Z' key.
    SELECT = 'Tab' key.
    START  = 'Enter' key.

    [player 2] - input is KEYBOARD2 (setup 2)
    UP     = 'U' key.
    DOWN   = 'J' key.
    LEFT   = 'H' key.
    RIGHT  = 'K' key.
    A      = 'S' key.
    B      = 'A' key.
    SELECT = 'Q' key.
    START  = 'W' key.

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

 3. Using the GUI
 ----------------

    After a long time, here's the GUI. It's very easy to use. A lot of items
 must to be finished/added with the time. Some of GUI items are:

 [Main]
  - Load ROM.........: It displays .NES/.NEZ/.FDS/.BAK files from a directory.
  - Game information.: Display ROM header information.
  - Save PCX.........: Saves a screen pcx.
  - Quit.............: Hmmm... I can't remember... damn!

 [CPU]
  - Reset............: It works like pressing RESET buttom in the console.
  - Hard reset.......: It works like power OFF and ON.
  - Information......: 6502 cpu core information.
  - Save state.......: The current game state will be saved in a slot.
  - Load state.......: Back to game to get the state restored.

 [Misc]
  - Video resolution.: You can change video card and video resolution.
  - Movies...........: Record, play, stop and status of a NES movie.
  - Palettes.........: Changes the current palette (for VS Unisystem games).

 [Help]
  - Help.............: A little help.
  - System...........: Shows the current display driver and sound card.
  - About RockNES....: Emulator information (version).

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

 4.iNES Format (.NES)
 --------------------

    The following is the NES header description (size = $10 bytes):

    +--------+------+------------------------------------------+
    | Offset | Size | Content(s)                               |
    +--------+------+------------------------------------------+
    |   0    |  3   | 'NES'                                    |
    |   3    |  1   | $1A                                      |
    |   4    |  1   | 16K PRG-ROM page count (size=x*0x4000)   |
    |   5    |  1   | 8K CHR-ROM page count  (size=y*0x2000)   |
    |   6    |  1   | ROM Control Byte #1                      |
    |        |      |   %####vTsM                              |
    |        |      |    |  ||||+- 0=Horizontal Mirroring      |
    |        |      |    |  ||||   1=Vertical Mirroring        |
    |        |      |    |  |||+-- 1=SaveRAM enabled ($6000)   |
    |        |      |    |  ||+--- 1=Trainer data (512 bytes)  |
    |        |      |    |  |+---- 1=Four-screen mirroring     |
    |        |      |    |  |      ($2000,$2400,$2800,$2C00)   |
    |        |      |    +--+----- Mapper # (lower 4-bits)     |
    |   7    |  1   | ROM Control Byte #2                      |
    |        |      |   %####00PU                              |
    |        |      |    |  |  |+- 1=VS Unisystem arcade       |
    |        |      |    |  |  +-- 1=Playchoice-10 arcade      |
    |        |      |    +--+----- Mapper # (upper 4-bits)     |
    |  8-15  |  8   | $00                                      |
    | 16-..  |      | Actual 16K PRG-ROM pages (in linear      |
    |  ...   |      | order). If a trainer exists, it precedes |
    |  ...   |      | the first PRG-ROM bank.                  |
    | ..-EOF |      | CHR-ROM pages (in ascending order).      |
    +--------+------+------------------------------------------+

    RockNES will check up ROM image size after loading; if the file size
 does not match the header specs, you'll receive a warning, and the game
 won't be emulated.
    IMPORTANT: the iNES format DOES NOT support mappers greater than 255.
 There are a couple of Famicom mappers >255. I have no idea HOW...

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

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

 VS Unisystem is/was Nintendo arcade machines, with titles such as Pinball,
 Super Mario Bros. and others. They work with coins and use different PPUs,
 boards etc., so you need to select a palette to see correct colors.

 Floating games should be in iNES format.

 In the GUI, you can choose a palette for a VS Unisystem game.
 Some of games may share a same palette:

 [GAME]................[PALETTE]
 VS Mach Rider          Use VS CastleVania, not perfect.
 VS Pinball             Use VS Gradius (7), perfect.
 VS Soccer              Use VS Goonies (5).

 For others games, try yourself... :P

 NOTES: Some of these palettes may be partial.
       VS Dr.Mario has reversed controls (joypad_1 for player 2 and such).
       VS DIP Switches are not supported yet.

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

 6. "What is a NES mapper??"
 ---------------------------

 I've found this question floating.
 Here's a shorty description:

 1. 'NES mapper' in an emulator is a routine that handles CPU reads/writes
 from/to a specific memory region. In other words, the 'emulation' of a
 special chip (sometimes as MMC = multi-memory-controller) and everything
 to suit the internal cartridge/board architecture. It does extra stuff to
 suit the game, such as video ROM switching (the character data, graphics),
 PRG pages (game music, stage, graphics or own 2A03 routines), IRQs (mostly
 for scores, like in Super Mario Bros. 3, cool effects like Rockman 6 title,
 or even for sound generation in the Dragon Quest games), extra sound chans
 (Konami VRCVI -- Akumajou Densetsu, jap. CastleVania 3) and more.

 2. When a game uses a mapper (notice that Super Mario Bros. or any other
 single game DOES NOT USE), the CPU writes to some memory areas, mostly to
 $8000-$FFFF space. Each address does something, or a range by itself.

 3. You may emulate these chips to get more games working. There aren't
 many docs avaliable. When someone reverse-engineering a cart board, new
 info comes up, and possibly its emulation.

 4. We write functions to emulate a mapper, which has an identification,
 such as a number (for iNES format), chip ID, board (for the upcoming UNIF
 format) etc. when some info comes up floating.

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

 -CREDITS-

 (no special order)
 A special big thank you goes to:

 - JoseQ for hosting RockNES website;
 - Kentaro Ishihara (Ki) for the sound sweep findings;
 - Matthew Conte for his 6502 core and help (http://www.nofrendo.org);
 - nyef for his great work on RockNES/DarcNES (http://www.netway.com/~nyef);
 - Chris Vallinga (a.k.a kritz, cvallinga@hotmail.com) for his Game Genie
 stuff and general help;
 - Nori (Famtasia author) for some help with NES mappers (information) 
 (http://www.tsukuba.venture-web.or.jp/~ppm/famicom/);
 - Alexandre da Veiga for the DirectX porting!
 - Goroh for his superb documents, including NESticle save state info;
 - FireBug for his efforts building a great mappers resource document;
 - Brad Taylor for his great NES sound docs;
 - Scott Wu for some Taiwan cartridges infos;
 - Mark Knibbs and Kevin Horton for RE'd some NES carts;
 - Samus Aran for the NTSC ppu timing document;
 - Ben Parnell (aka xodnizel, FCEU author).

 I would like to say "hello" and "thanks" to:

 Akilla, ReaperSMS, Delta, loopy, Chris Covell, Shawn Sharpe, MGandhi,
 ZeroAge, fnm, Zoop, Opi, uzplayer, Lycia, Zophar, _Bnu, Justin, Xip,
 Marco, katharsis, Marat, Sephiroth, PrOxY and ^oRBIT.

 NO thanks goes to... guess who?

 NOTE: Please, visit http://www.emunews.net/ (the great and dead EmuNews
 Service archives) for information about all RockNES development (when I,
 kritz AND nyef were working on this project).

 [==========================================================================]
  WEB: RockNES website (now under JoseQ's Emuviews)
  http://rocknes.emuviews.com/            -The best coder is _you_-
  fx3rnes@hotmail.com                     -Emulators are not w4r3Z-
 [==========================================================================]
//eof
