                      ---------------------------------
                             NES/Famicom FOREVER 
                       NES/Famicom Emulator fwNES 0.151b 
                            Based On CYS's hacking 
                      Main Emu Core by FanWen Yang 1998/3/30
                            Sound Core by Shu Kondo
                                 SVGALIB 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. 

 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 )
2. PPU Registers almost fully emulated
3. Full sound channel emulated

*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 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
                                                        FamiJump 2 ..etc  
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,YoKaiClub
fwNES mapper 67		Sunsoft Mapper 3	        FantasyZone2J
fwNES mapper 68		Sunsoft Mapper 4	  	Afterburner 2J
fwNES mapper 69		Sunsoft Mapper 5	  	Batman: Return of the Joker, Batman (J)
fwNES mapper 70         74161/32                        KamenRiderClub.Saint Seiya,PocketZarus
fwNES mapper 71         Camerica Mapper                 FireHwak
fwNES mapper 72         Jaleco Early Mapper #0          Jaleco TennisJ,PinBallQuestJ
fwNES mapper 73         Reserved for Konami VRC?        ???????
fwNES mapper 74         Taiwan MMC3 -Varient Mapper#0   KidNiKi3J(hacked)
fwNES mapper 75         Jaleco Mapper SS8805/KonamiVRC1 Jaleco BasketBall 2by2 J Ganbare Goemon1J
fwNES mapper 76         Namco 109                       Megami Tenshi
fwNES mapper 77         Irem   Early Mapper #0          NaporeonSenki,HolyDrive
fwNES mapper 78         74161/32                        CosmosCarrier.
fwNES mapper 79         AmericanVideoEntertainment      F15Citywar,Trolls  
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
fwNES mapper 85         Konami VRC 7                    TinyToonAdv2J,Lagrange Point
fwNES mapper 88         Namco 118                       Devilman          
fwNES mapper 100        MMC3/Nestice/Trainer/Buugy Mode Used in hacked roms !!

*the emulator itself supports:

7 screen modes:
    320x200 
    256x240 
    256x224 
    256x256 
    256x256 with scanlines 
    288x224 
    288x224 with scanlines
    


1 sound choice
   All sound Device SEAL Lib Support !
   (Digital Sound)

-----------------------------------------------------
 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?
------------------------------------------

 -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
 -irqad2    <number> - Adjust IRQ for Konami Mappers  Auto(default)
 -vgamode <mode>
         0: 320x200            1:256x240            2:256x224 (default)
         3: 256x256            4:256x256-scanline   5:288x224
         6: 288x224-scanline   7:640x480 VESA

 -vsyncon            -Sync the VGA when drawing to screen
 -vsyncoff           -TurnOff  

 -palette <mode>
         0: iNES's Palette  1: PasoFami's Palette  2: Loopy's Palette (default)
 -sound   <mode>  - Sound Mode
                       0: Off , 1: SB 2: SB AWE 3: PAS 4:UltraSound Max
                       5: UltraSound 6:Windows Sound System 7:Ensoniq SoundScape
                       8: Auto delete (default)
                                                     
  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
  <0>-<9>       - RealTimeSave/Load Slot Selector !
  <F1>          - RealTimeSave *.RT?
  <F2>          - RealTimeLoad *.RT?
  <F3>          - SoftReset (as Reset Button on a NES/Famicom)
  <F4>          - CoolReset (as Power On/Off on a NES/Famicom)
  <F5>          - Fix Some Spilt Screen Games ,FinalFantasy 2 ,3 J
  <F6>          - disable F5
  <F7>          - FrameSkip Increase
  <F8>          - FrameSkip Decrease
  <F9>          - Delay Increase ( For Faster Machine )
  <F10>         - Delay Decrease ( For Faster Machine )
  <S>         - Save Screen into .PCX
  <Esc>         - Exit to OS

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

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

   1. Q: How can i use RealTime Save/Load function ?
      A: press "F1"to save current game ,press "F2" load saved games.

   2. Q: I want save more current game ,can i ?
      A: YES.sure,you just press 0 to 9 to switch current slot .
         default slot is 0 when starting fwNES .
         *.RT0 -> *.RT9

   3. Q: Oh.I like the gameplay screen ,can i save it ?
      A: Yes,you can press "F12" to dump SCREEN into .PCX .
         Rules is that: 
              if you play fwnes.NES ,it will auto save .PCX
              into fwnes01.pcx,fwnes02.pcx .....so on.  
  

   5. Q: Can i use RealTime Save/Load function cross 6502 Core ?
      A: Probaly YES,but i don't suggest you to do .
         if you use M6502 then keep using it . 

   6. Q: I want reset all emulator status ? how to do ?
      A: Deleted .INI .
  
   7. Q: My favorite game seem not supported?
      A: Send me your game mapper infos.i will try my best to support it !
   
   8. Q: your emulator is too fast on my machine ? how to slow down?
      A: -frameskip 0 , -delay <0-30> ..or turn on Vsync !

  
  10. Q: What is Mapper #100 for ?
      A: bcos Nestice 's MMC3 Buggy emulation... so there are tons of trained games.
         you must use this for those game (Trained for Nesticle ).
           
0.10 Version

   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 */
                                         -irqad2 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 115 
             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: ????? Wow..are you kidding ? Sound is very good :)

     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 directly . 

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

        Send Tech info for Famicom/NES and FDS and Light-Gun..etc to author 
        yangfanw@ms4.hinet.net 
  
-----------
 Greetings
-----------
    Thanks to Shu Kondo for S6502 emu core and some cool suggestion and help,and Sound Routine !
    Thanks to SEAL Sound LIB Authors .
	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 Blaster and Washi.for various mappers infos .
	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 

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)                                         
