                      ---------------------------------
                             NES/Famicom FOREVER 
                         Vertigo2099 prouldy presents
                       NES/Famicom Emulator fwNES 0.1b 
                            Based On CYS's hacking 
                           By FanWen Yang 1998/2/24
                                 DOS Version
                      ---------------------------------

-----------------------------
 What is a NES or a Famicom?
-----------------------------

	In the mid to late 80s, there was a popular television video game console
known as the Nintendo Entertainment System. In Japan, this revolutionary system
was known as the Famicom (short for Family Computer). It is an 8-bit machine, using
a 6502 CPU, much like the old Apple ][. The rest of the hardware includes a
Picture Processing Unit (PPU) and a sound chip producing 5 channel sound (2 channels
for square waves, 1 traingle wave, 1 noise channel and 1 PCM sound channel). It 
contains 1K of RAM and 4K of VRAM. In Japan, an addon knwon as the Famicom Disk
System (FDS) was released. The FDS used 3" floppy disks instead of the standard
cartridges and its hardware enhanced sound quality, adding two sound channels.
Nintendo also released peripheral devices such as the Zapper (light gun) and the
Power Pad.

----------------------
 What is an Emulator?
----------------------            
        
	An emulator is a program that makes one machine act like another machine... in 
this case, giving the PC all the information it needs to mimic the original NES/FC console.

--------------------
 Why write fwNES98?
--------------------
	The author of this emulator has very fond memories of growing up with his 
Famicom, and there is no complete Famicom emulator. Therefore he decided to write his own
Famicom/NES emulator. 

	A little more background:

	The idea for a new NES emulator was began by Vertigo 2099. Programmers JL_Picard and 
/Firebug/ began working on a new NES emulator, code named vNES. After seeing the work that was
accomplished, FanWen, a member of Vertigo 2099, took over the project and from then on,
progress was simply amazing... fwNES was born.

-------------------------
 What is fwNES98's Goal?
-------------------------
	Full emulation of NES/Famicom hardware, memory mappers, and sound channels. If 
possible, the author will add FDS support.

---------------------------------
 What is fwNES98 current status?
---------------------------------
*Famicom/NES itself 

1. 6502 (Using Marat's M6502 core and Neil's N6502 core)
2. PPU Registers almost fully emulated
3. Sound Channel 1-4

*mappers supported: (fwnes follows the interNES .NES .NEZ file standard plus 
                       fwNES98's own set of extended mappers)

Byte    Context
-------------------------------------------------------------------------
0-3       String  "NES^Z"
4         Number of 16K Program Data Block
5         Number of 8K Chr Data Block
6         bit 0     1 Vertical Mirroring, 0 Horzontal Mirroring
          bit 1     1 Battey Backup ($6000-$7FFF)
          bit 2     1 Trainer on ($7000-$71FF
          bit 3     4 Screen Buffer ($2000-$2FFF)
          bit 4-7   mapper number low 4 bit 
7         bit 4-7   mapper number high 4 bit 
8-15      Reserved
16-...    Trainer ->Program Block ->Chr Block
EOF 
-------------------------------------------------------------------------

Mapper Number		Chipset Name		Example Games using particular Mapper

iNES mapper 0		32kb ROM/8k VROM	  	Super Mario Bros, Mario Bros, Clu Clu Land
iNES mapper 1		Nintendo MMC1 	  	Kid Niki, Dragon Warrior 3-4, Mega Man 2	
iNES mapper 2 		UNROM (ROM switch)  	Castlevania, Life Force, Skate or Die 
iNES mapper 3		CNROM (VROM switch)	Gradius, Paperboy, Q-Bert	
iNES mapper 4		Nintendo MMC3		SMB3, Contra Force, Crystalis
iNES mapper 5		MMC5 			  	Castlevania 3, Metal Slader Glory, 
								many Koei games
iNES mapper 6		FFE F4xxx			The Money Game, Arabian Dream Sharezerd
iNES mapper 7		AOROM (32kb ROM Switch) Wizards and Warriors, Solstice, Cobra Triangle
iNES mapper 8		FFE F3xxx series 	  	Doraemon Kaitakuhen
iNES mapper 9		Nintendo MMC2		Punch-Out
iNES mapper 10		Nintendo MMC4		Punch-Out Syouhinban, Fire Emblem, Family War
iNES mapper 11		Colour Dreams		Pesterminator, Bible Adventures, Crystal Mines
iNES mapper 15		100-in-1 chip		100-in-1 Contra Function 16, Crazy Climber, 
								Mobile Suit Gundam Z
iNES mapper 16		Bandai chip		  	Dragon Ball Z series, SD Gundam Night 
								Gundam Story 1-3
iNES mapper 17		FFE F8xxx		  	Dynamite Batman 2, Parodius, Dragon Ball Z 3
iNES mapper 18		Jaleco SS8806		Jaleco Pro Baseball '90
iNES mapper 19		Namcot 106		  	Final Lap, Family Stadium '90, Splatterhouse
iNES mapper 21		Konami VRC4 2A		Ganbare Goemon Gaiden 2, Wai Wai World 2
iNES mapper 22		Konami VRC4 1B		Twinbee 3
iNES mapper 23		Konami VRC2b		Wai Wai World, Getsufuu Maden
iNES mapper 24		Konami VRC6		  	Akumajo Dracula 3, Mouryou Senki Madara
iNES mapper 25		Konami VRC4		  	Gradius 2, Ganbare Goemon Gaiden
iNES mapper 32		Irem G101		  	Image Fight (J), Parman
iNES mapper 33		Taito TC0190/TC0350	Power Blazer, Pon Poko Pon
iNES mapper 34		Nina 1			Impossible Mission 2, Deadly Towers, AVE games
fwNES mapper 64		Tengen Rambo-1	 	Klax, Shinobi, Skull and Crossbones
fwNES mapper 65		Irem H3001		  	Daiku No Gensan, Parman 2
fwNES mapper 66		74161/32		  	Dragonball, Bio Sensi Dan
fwNES mapper 67		Sunsoft Mapper 3	  
fwNES mapper 68		Sunsoft Mapper 4	  	Afterburner 2
fwNES mapper 69		Sunsoft Mapper 5	  	Batman: Return of the Joker, Batman (J)
fwNES mapper 80		X-005			  	Demon Sword (J)
fwNES mapper 81		C075
fwNES mapper 82		X1-17
fwNES mapper 83		Cony Mapper		  	Garou Densetu Special 
fwNES mapper 84		Pasofami mapper		.500 and .MOD games



*the emulator itself supports:

7 screen modes:
    320x200 
    256x240 
    256x224 
    256x256 
    256x256 with scanlines 
    288x224 
    288x224 with scanlines
2 joystick options
    2 button standard
    4 button Gravis

1 sound choice
     Adlib Only :P

-----------------------------------------------------
 What are the minimum system requirements for fwNES?
-----------------------------------------------------

this does not mean for 100% performance.. 

 PC   : IBM Compatible PC
 CPU  : 586 (AMD, INTEL, CYRIX)
 RAM  : 16 MB
 OS   : DOS 6.22 or Win95 DOS Box 
 
------------------------------------------
 What are fwNES98's command line options?
------------------------------------------

 -n6502              - Use Neil6502  Core Faster, but buggy and Unoptimized
                     - Use Marat6502 Core Good But Slow (default)
 -cycle     <number> - Number of CPU Cycles Per Scanline <114>
 -frameskip <frame>  - Number of Frame Skip When Update Screen <2>
 -vbline    <lines>  - How many scanlines during VBLANKING  [15]
 -irqad     <number> - Adjust IRQ for Various Mapper, Auto(default)
                       Details later in this file
 -ppufix1            - Fixes some graphics problems
 -ppufix2            - Fixes some graphics porblems
 -vgamode <mode>
         0: 320x200            1:256x240            2:256x224 (default)
         3: 256x256            4:256x256-scanline   5:288x224
         6: 288x224-scanline
 -vsync              -Sync the VGA when drawing to screen
 -palette <mode>
         0: iNES's Palette  1: PasoFami's Palette  2: Loopy's Palette (default)
 -sound   <mode>  - Sound Mode
                       0: Off (default), 1: Adlib 2: SoundBlaster 3: Midi Out
                                                       (not yet)      (not yet)
 -joy4               - Use 4 Buttom GamePad (Gravis GamePad)
 -joy2               - Use Standard JoyStick

  Default Key Mapping :
  <Space>       - Button A
  <LeftControl> - Button B
  <Tab>         - Button Select
  <Enter>       - Button Start
  <Right-Arrow> - Right
  <Left -Arror> - Left
  <Up   -Arrow] - Up
  <Down -Arrow> - Down
  <Z >          - AutoRepeat A Toggle
  <X >          - AutoRepeat B Toggle
  <Esc>         - Exit to OS

--------------------------------------
 What are fwNES's current known bugs?
--------------------------------------

     1. PPU emulation not perfect 
     2. Pallette Bugs/background & sprite prorities
     3. inaccurate sound. no PCM.
     4. mapper 6/Namco/MMC5/VRC6 not fully supported. MMC3 
          and other mappers suffer from some minor glitches.
     5. HitFlag and Split handling Buggy
     5. No GUI. No Gravis Grip Supported .
     6. Will crash some computers :P (i don't think so really)
     7. no VBE supported 

-----------------------------     
 Frequently Asked Questions
-----------------------------

   1. Q: What is an Emulator?
      A: if you don't know what is emulator,then forget fwnes :P . you can
         read some articles from newsgroups or some web sites to find out.
         check out http://zophar.internexus.net 

   2. Q: What do you need to run fwnes98? 
      A: you need a DPMI server to run fwnes98, CSWDPMI.EXE (default) or under
         Win95's dos box.
      
   3. Q: Where are some games?
      A: I don't know.. do a web search, or check out http://emu.internexus.net/Vertigo/
 
   4. Q: How do i convert my carts to work with fwnes98?
      A: using some custom copying devices...i know there is one called "IO/56"
                         
   5. Q: How can i backup savegames when i quit the game ?
      A: There are 2 type game backup systems, one is EPROM Backup, the other is Battery Backup.
         fwNES98 will autosave into .sav if the type is Battery. As for EPROM, sorry but fwNES98
         doesn't support realtime load/save yet.

   6. Q: This Game doesn't work with fwNES98 !
      A: If Gray screen,then check the header of the ROM..is it correct?
         Number of Prg Block, Number of Chr Block? Trainer? ..etc
    
   7. Q: The gameplay scrolling is wrong?
      A: Change the header of file...Vertical mirroring / Horzontal mirroring

   8. Q: The graphics still messed up or no status bar 
      A: try  -ppufix2, wizard&warrior 1, 2, Cobra Triangle ..
              -ppufix1 for DragonBall 2 ,DragonBall 3         
       (i hate the Rare games :P breaking my handling for PPU)

   9. Q: The game loads, but locks up during gameplay, or at the title screen.
      A: adjust  -cycle and -vbline ... try increasing the number.

   10. Q: The graphics are messed up in some scanlines only .
       A: using -irqad to adjust it
             Mappers 
           A)     
             4             /*MMC3    */ 
             5             /*MMC5    */
             64            /*Rambo   */
                                        -irqad A  0<A<16
           B) 
             17            /* FFE     */
             16            /* Bandai  */           
             18            /* Jaleco  */
             19            /* Namco   */
             65            /* H3001   */             
             69            /* SunSoft5*/
                                        -irqad B 100<B<140  
           C)
             21            /* VRC 4 */
             22            /* VRC 4 */
             23            /* VRC 4 */
             24            /* VRC 4 */
             25            /* VRC 5 */
                                         -irqad C 0<C<40
             
       the follow games have been tesed
             Megami Tenshi 2      -irqad 130
             Dragon Ball 2       -irqad 115
             Dragon Ball 3       -irqad 110
             Dragon Ball Z       -irqad 115    
             Dragon Ball Z2      -irqad 117 
             Dragon Ball Z3      -irqad 115
             Dragon Ball ZGaiden -irqad 116
               
       IRQ adjust will affect by -cycle and  -vbline       


       to run SMB3 correctly use -cycle 125 -irqad 0 -ppufix2       

     11. Q: The Sound is Bad!
         A: Sorry..but still better than no sound!

     12. Q: Help! My monitor is going crazy!
         A: use  -vgamode to choose a different screen resolution.

     13. Q: The Joystick doesn't work!
         A: Get a good joystick, i prefer my Gravis Gamepad.
                      
     14. Q: I love your emulator, how can i tell you?
         A: Send me a email with a joke..
 
     15: Q: I don't like your emulator, how can i tell you ?
         A: Send me a email with a sexy porn

     16: Q: Your emulator is too slow on my machine!
         A: It happens. You still can play some mapper 0 games with -n6502 

     17. Any other problems? Email the author, or vertigo2099@hotmail.com

-------------------------
 How can I help fwNES98?
-------------------------

	Send Tech info for Famicom/NES and FDS and Light-Gun..etc to fanwen c/o
	vertigo2099@hotmail.com
  
-----------
 Greetings
-----------
	Thanks to Marat for M6502 emu core and emulib.
	Thanks to Neil for N6502 emu core .
	Thanks to Vertigo and #mul8 friends for beta testing, and suggestions. 
		JL_Picard Barkley /Firebug/ Loaded _Rza_ 
            Opoth lugnut GreenSky VmprHuntrD
	Thanks to carol for compatible list and beta testing .
	Thanks to Jim Geffre for various infos and help. 
	Thanks to others who help me with fwnes98 project!!! 

---------------- 
 Special Thanks
----------------
 	CYS. without him, fwnes98 will never have existed, all famicom/NES infos
and mapper info is based on his hackings and his experience. During the coding
fwnes98, he also helped a lot. "THANK YOU A LOT, MY FRIEND".

----------------------
 fwNES98 User License
----------------------
	fwNES98 is Shareware. But you don't pay any money to the author, and you get a fully 
fuctional version of it. But you can't distrubute fwNES98 with any game roms. If you do 
this it will hurt me and hurt the emulation development. And you can't sell fwNES98 for other 
commerical purposes. And I don't hold any responsiblity if fwNES98 cause any damage to your 
PC. Use it at your risk.

---------------------------
 How to Contact the Author
---------------------------

Email  : yangfanw@ms4.hinet.net 

       : vertigo2099@hotmail.com
             
Official Vertigo 2099 distribution site:  
	http://emu.internexus.net/fwnes/

WebPage: 
	http://neuralpc5.cs.ccu.edu.tw/~fanwen/fwnes_e.htm (English )
	http://neuralpc5.cs.ccu.edu.tw/~fanwen/fwnes.htm   (Chinese )
	http://neuralpc5.cs.ccu.edu.tw/~fanwen/fwnes_j.htm (Japanese)                                         
