
 ------------------------ 
  Welcome to century XXI      "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,2001 -= Fx3 =- version 1.703, 01/27/2001
   LICENSE: Freeware.

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

 ----------------------------------------------------------------------------
   Disclaimer:
   ^^^^^^^^^^^

   - Nice! You are on 1% of guys that READ software documentation. 
   - 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.

 ----------------------------------------------------------------------------
 ----------------------------------------------------------------------------

   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 or any other thing.
 => Do not ask me 'how to write/start' anything (like emulators).
 => Do not ask me about future versions of anything, ever.
 => Do not ask me where you find games (maybe in an old cartridges store?).
 => RockNES may not work good with all machines (doh).
 => I *cannot* add netplay, so stop asking for support it. However, if you
 have time/interest/motivation to write one, please, contact-me.
 => I will not add any more pirate MMC3-compatible mapper that comes up.
 => If you do not like RockNES, so try a real NES.
 => If your pretty joypad (like Sidewinder or any other) does not work,
 I can't do anything, sorry... Allegro's input stuff is directly used.
 => _READ_ this doc fully before "it's very slow in my Pentium 1000 GHz".

 RockNES is tested many times 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 within junk in the header. Use a
 good tool to fix them... However, if after all fails, so submit me the game
 information (a text file within game title, mapper and problem description).
 ----------------------------------------------------------------------------

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

Version 1.703 (01/27/2001)
 - Fixed savestate code to suit big-endian byte order (the MacOS);
 - Fixed EAGLE blitting (removed debug junk);
 - Fixed sprite ram data overflow (oh boy);
 - More fixes to MMC5 (IRQ is working again, sorry).

 Note: feel free to edit 'oldnews.txt' to check out past changes.

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

 1. RockNES: description and 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 and features
 ------------------------------------

 * This piece of software is a Nintendo Entertainment System 8-bit (NES)
 videogame emulator. I wrote it because the NES is/was my pretty videogame.
 Notice that the NES is +- 18 years old! :-)
 * RockNES 0.99 marks a full rewrite of original RockNES (old xNes). It was
 designed to be very compatible, accurate when emulating the hardware and
 as fast as possible.

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

 - NES 2A03 (CPU) emulation by Matthew Conte;
 - NES 2C02 (PPU) emulation with scanline gfx engine;
 - NES I/O (like joypads);
 - Sound emulation of all 5 channels: pulses, triangle, noise and PCM;
 - Palette very closed to real NES;
 - Color emphasis and monochrome modes;
 - WorkRAM (backed battery, if present).

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

 - Konami's jap. VRCVI sound hardware emulation (Akumajou Densetsu/Madara);
 - VS Unisystem arcade machines (missing linked-system) in iNES format,
 emulated as mapper #99, still preliminary;
 - Famicom DiskSystem, emulated as mapper #20 (you'll need FDS images and
 the BIOS 'disksys.rom' at same RockNES folder, find/dump it by yourself);
 - 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,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,151,160,180,184,187,189,225,226,227,
 228,229,230,231,232,233,234,235,240,246 and 255.
 Most of these 82 mappers have full support.
 Note: If you want to get emulated a non-listed mapper, send me docs.

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

 - NES Movies (*.RMx files, x=0..9);
 - Save states (*.RSx files, x=0..9);
 - NESticle saved states loading (*.STA, *.STx files);
 - GUI, config file, inputs fully configurable;
 - many bitmap blitters, plus EAGLE effects.

   The following features are missing:
   -----------------------------------

 - NES PAL and Famicom hardwares;
 - Correct PPU sprite #0 hit;
 - 100% correct CPU timing;
 - External devices like PowerPad, Zapper and others;
 - VS Unisystem linked-system;
 - Playchoice-10 upper monitor (within game instructions, z80 emulation);
 - Game Genie codes (when ready, they'll return);
 - Famicom DiskSystem sound output, and some 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 enable VESA support).


 * About the ZIP support:
 ------------------------

 - The awaited ZIP support is now supported, thanks to katharsis.
 The first file present in a ZIP file will be loaded.


 * 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 patch 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-$FF). Be careful on 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).
 - It's fairly obvious that you cannot input GameGenie codes.

 * 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.
 You simply type 'rocknes <gamename.ext>' to launch the emulation.
 Yes, the <gameblah...> can be ommited.


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

 - A file named 'rnsetup.cfg' is created automatically when not found at
 current folder. Edit this file using a text editor (ms-edit or notepad)
 to set many options, like a default directory for ROM images.
 - EAGLE effects (in a set of bitmap blitters) can be enabled as well.

 You can setup directories for savestate, screenshots, movies, battery and
 ROMs. RockNES will not create these folders, so don't go type junk.
                    ^^^
 [==========================================================================]

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

 - The configuration file ('rnsetup.cfg') is generated at current directory
 automatically when not found. Edit the file for more help. You can setup
 video, sound, inputs... a couple of things.
 - During the emulation, keys work as follow:

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

 <F1>  - Display FPS counter.
 <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.
 <F8>  - nothing

 <F9>  - Movie record (again to stop).
 <F10> - Movie play (again to stop).
 <F11> - Quit to OS directly.
 <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. Some of the items are:

 [Main]
  - Load ROM.........: Display .NES/.NEZ/.FDS/.BAK/.ZIP 
  - Game information.: Display ROM header information.
  - Save PCX.........: Save a screenshot (PCX).
  - Quit.............: Hmmm... can't remember... damn!

 [CPU]
  - Reset............: works like the console RESET buttom.
  - Hard reset.......: works like Power OFF->ON.
  - Information......: 6502 cpu core credits.
  - Save state.......: The current game state will be saved.
  - Load state.......: A game state is restored.

 [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).

 [Help]
  - Help.............: A little extra help out of this document.
  - System...........: Current video and soundcard devices, plus resolution.
  - About RockNES....: Emulator information/credits.

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

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

    Following the iNES 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 AND the file size is shorter, 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. They use byte #7 (low 4 bits),
 which conflicts with VS Unisystem/PlayChoice-10 identification.

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

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

 VS Unisystem is/was Nintendo arcade machines, with titles such as Pinball,
 Super Mario Bros. and others (insert coin$). Since they use different PPUs,
 the palette will look wrong, so change it to a correct one using the GUI.
 Plus, there are minor differences not yet fully emulated.

 Games must be in iNES format. Split form is not supported.
 The MAME sets of VS games (ZIP) should be added in the next RockNES release.

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

 NOTES: * Some of these palettes are partial.

        * VS Dr.Mario has reversed controllers
           (joy1 for player2, joy2 for player1).

        * DIP Switches are not supported.

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

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

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

 1. 'NES mapper' means a chip inside the cartridge to manage memory, usually
 to swap PRG or CHR data banks to 'dribble' the native NES capabilities (the
 8K PRG and 2K CHR). Examples of chips are the Nintendo's MMC series.

 2. In an emulator, it's a routine to emulate the whole cartridge board. For
 clear knowledgement, it handles CPU/PPU reads/writes from/to a specific
 memory area. Each address does something, or a range by itself.

 3. Some cartridges use extra hardware, like Konami's VRC chips for sound
 expansion, or CPROM board (expands the CHR memory to 16K).

 4. Notice that Super Mario Bros. or any other single game doesn't use a
 mapper or hardware expansion, because the NES suits the game.

 5. You may emulate these boards to improve the compatibility rate. 
 When someone does a reverse-engineering of a cart board, new info comes up,
 and emulation becomes possible.

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

 -CREDITS-
 (no special order)

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

 A special big thank you goes to:

 - Kinox for hosting RockNES website;
 - Kentaro Ishihara (Ki) for the sound sweep and I/O 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 (aka 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!
 - Richard Bannister for the MacOS 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, FCE Ultra author).

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

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

 NO thanks goes to... guess who?

 NOTE: visit Snakeyes Gaming Corp (at http://sgc.emu2k.com/) archives for
 information about all RockNES development (when I, kritz AND nyef were
 working on this project).

 [=========================================================================]
  RockNES
  http://kinox.org/rocknes                -The best coder is _you_-
  fx3rnes@hotmail.com                     -Emulators are not w4r3Z-
 [=========================================================================]
//eof
