
********************************************
********************************************
**********      NotSo Fatso!      **********
********************************************
********************************************



v0.851  - - don't you wish it was done?  ;) - -


===============================
== Intoduction / About
===============================

    NotSo Fatso is an NSF/NSFE plugin for Winamp 2.x.  It was made in order to create
a player for a common interface (Winamp) with options that either are completely
lacking from other players, or are in some but not in others, all while striving to
be as accurate and as fast as possible.


===============================
== Installing
===============================

    Copy in_NotsoFatso.dll into your Winamp\Plugins\ directory.
    You know.. just like all your other plugins ;)

    I plan on making an installer eventually... but for now you gotta do it by hand =P


===============================
== NSF vs. NSFE
===============================


Why you'd want to keep NSFs
===========================
- They can be played in any NSF player (NSFEs aren't supported by many/any apps outside of NotSo)
- They are a bit easier to hack... as the data is in fixed positions in the file
- More websites distribute them


Why you'd want to use NSFEs
===========================
- Designate track times / fade times to individual tracks of NSFs
- Add labels to tracks so that you don't have to remember their track number
- Remove unwanted tracks through the internal playlist (like sound effects)
- Easily expandable for future capabilities (NSFs are rather fixed)


    Aside from compatibility with players / extra options... NSFs and NSFEs are near identical.  You can
convert between the two at any time without loss of sound quality (though if you convert to NSF, you
will lose track time/fade info and other expanded features).


===============================
== Using the beast
===============================

    NotSo will play NSFs regularly like any other Winamp plugin.  Just load the file you
want and hit play.  The NotSo play control box will pop up allowing you to easily jump
to whatever track you want to listen to... as well as providing you easy access to the
config options.

    For those of you interested in the extra features:

Adding Track Times - NSFEs allow you to designate a length to tracks of an NSF.  To assign
    or alter track times for an NSF, right click on the file in Winamp's playlist and select
    "File Info".  A dialog box will pop up giving you details on the NSF.  If the file is
    Extended (NSFE), you can flip to the Track Info tab and fill in the info (note:  the "Now"
    buttons will only work if an NSF/NSFE is currently being played in Winamp).  If the files
    is not extended (NSF), you will need to convert it to NSFE in order to add track times.
    The conversion button is at the bottom of the dialog.

Using NSF "Shadows" - NSF shadows are entries in Winamp's playlist which point to a specific
    track of an NSF file.  They're the alternative to dealing with NotSo's play control box.
    Using shadows makes it so you can listen to single tracks of the NSF just like you can
    listen to other music files.  To add shadows to the list... right click on the NSF you
    want to make shadows from, select File Info, and choose one of the shadow options at
    the bottom.  "Shadow -> Winamp" will put all the shadow track in Winamps playlist,
    "Shadow -> File" will save them all to a Winamp playlist file (.m3u) on your computer.


===============================
== The Config Options
===============================

=========
==Page 1:

Output Options:

 - Sample Rate:  Number of samples generated per second.  Higher = better quality sound but
    slower performance.

 - Stereo:  Checked for Stereo output, unchecked for Mono output.  Stereo mode allows for
    channel panning and inversion.

 - Prefer PAL mode:  Checked to use PAL emulation mode in NSFs which are dual NTSC/PAL.


Misc:

 - Master Volume:  Controls the internal volume of generated samples.  Putting it too high
    could result in clipping, so be careful.

 - Speed Throttle:  Controls the number of 'play calls' per second, which affects the tempo
    of the song.

 - Use Default Speed:  If checked, the Speed Throttle is ignored and the NSF plays at its
    normal expected rate.


Filter Options:

 - HighPass:  Strength of the Highpass filter (and option to disable).  The highpass
    filter removes frequencies below a certain point and also keeps the output near
    the 'center line'.  Disabling the highpass filter will likely cause severe clipping
    unless the master volume is taken waaaay down.

 - Lowpass:  Strength of the Lowpass filter (and option to disable).  Lowpass filter
    removes frequencies above a certain point.

 - Prepass:  Strength of the "prepass" filter (a term I made up!).  This term is sort of
    like an additional lowpass filter, but it designed more to smooth out the rough edges
    of the generated waveform.


Default Times:

  Sets the default Length and Fade of NSF tracks.


=========
==Page 2:

Auto Open Play Control:

  Uncheck to stop the NotSo dialog from popping up when an NSF plays.


Display String Formatting:

  Configure the way NSFs strings are displayed.


Misc UI Options:

  - Disable NSFE playlists:  Ignore NSFE playlists if they're included in the file.

  - Play Indefinitely:  Keeps playing/looping the NSF forever!

  - Subclass Winamp:  Intercepts winamp controls  (Prev button, Next button, Play button,
     'z' key, 'x' key, 'b' key, and Numpad 4 5 and 6)  and uses them to flip through NSF
     tracks rather than flip through entries in Winamp's playlist.

  - Always on Top:  Gives the NotSo dialog "Always on Top" status

  - Use Mini Play Control:  Provides an alternative, smaller play control dialog.

  - Mini Always on Top:  Gives the mini play control dialog "Always on Top" status.


=========
==Page 3:

Misc:

  - DMC Pop Reducer:  Enables the DMC Pop Reducer

  - N106 Pop Reducer:  Enables the N106 Pop Reducer

  - FDS Pop Reducer:  Enables the FDS Pop Reducer

  - Ignore $4011 Writes:  Disregards ALL writes to the $4011 register (will reduce pops, but
     could also prevent intended sounds)

  - Reset Duty on $4003/7:  Resets the square's Duty Cycle on writes to their register.
     Adds more pops, but may be technically accuate (unsure whether ot not the real thing does it)



Strictness Settings:

** Note **  All these settings are included to try and play broken NSFs (NSFs with rip issues).
  All good NSFs should (and will) play with all these options off.  If an NSF takes one or more
  of these options to play properly, there's a problem with the rip.

  Leaving some of the options on COULD break NSFs which are ripped properly.


Detection Options:

  - Prevent Inverting under ## Hz:  Prevents the channel from inverting when it gets below a
     certain frequency (for people with subwoofers)

  - Stop after ## MS of silence:  Ends the track when so many milliseconds of silence pass.

  - ...Unless track length is specified:  Ignores silence and plays the full track when the
     NSF has a specified length.

======================================================
==Channels / VRC6 / MMC5 / N106 / VRC7 / FME-07 pages:

Enabled - Toggles mixing of the desired channel

Vol - Adjusts the volume level of the channel (0 = min, 255 = max)

Pan - Adjusts the panning of the channel (-127 = full left, 0 = center, 127 = full right)

Invert - Inverts the right speaker for the channel for a pseudo-surround sound effect.

Note that not all sound channels are used in all NSFs.  For examples VRC6 channels are only used
in NSFs which use the VRC6 expansion chip.


===============================
== Credits
===============================

    Disch - making it ^_^

    Yona - support, making a fancy GUI for the standalone app (not released yet).
        Assisted with DFC (my ripoff of MFC)

    Koitsu (from the NesDev boards) - massive reports of NSFs which behaved strangely.
        He's the one that lead to the massive revisions of v0.65

    Richter X - Bug-finding / testing, channel inversion idea (I love it!)

    Lenophis - Bug-hunting

    JCE3000GT - or whatever your handle is now ;).  Exposing MFC as the root of all
        evil, as well as bug-finding

    All the good fellows at ZMD - for even more bugfinding

    Kevin Horton - for developing the NSF format

    Brad Taylor - for the god-like docs explaining the workings of NES sound.

    Blargg - for more docs covering the trickiness of the Tri/Noise/DMC inter-dependent
	amplitude, as well as other areas.  Along with other ideas / improvements / optimizations.

    Tatsuyuki Satoh - excellent OPL2 emulator used for emulating the VRC7 chip.

    Xodnizel, Quietust - making the VRC7 -> OPL2 conversion painless ^^

    Xodnizel - For many other things, including the new filter ^^.  FCEU rocks, man =)

    Nosefart/NEZplug/VirtuaNES source/authors - for getting me out of a few jams ;)

    All the other zillions of people who put work into NSFs to make them so great ^_^


go to the NSF archives at ZD (http://www.zophar.net/nsf/) for NSFs

go to the NSFE archives at Slick Productions (http://disch.zophar.net/nsfe/nsfe.php)
  for tagged NSFEs

go to Slick Productions (http://disch.zophar.net) for fun!


===============================
== To Player Authors
===============================

    I made this player to try and push the NSFE format into motion.  Track times and
other features just weren't going to happen with the standard NSF file format.

    If you're interested in adding support for NSFE files, please check out the
format specifics here:

http://disch.zophar.net/nsfe/nsfespec.txt

    Any and all support for the format is encouraged and welcome ^_^.


===============================
== Known Issues
===============================

 - Winamp crashes if you try to close when the file info dialog is open
    *********  This is confirmed to be a problem with older Winamps and not with NotSo ******

 - NotSo causes the Winamp window to include all file types.  From what I can tell, this
     is a problem with Winamp, not with NotSo.  Seems like Winamp doesn't like file extensions
     that are longer than 3 characters (When I take out the 'NSFE' addition to the file dialog,
     all is well).

 - Square channels of the same volume will sometimes 'cancel each other out' by being
     exact opposites of each other.  I've noticed this on Track 3 of DuckTales.nsf,
     but only sometimes.  It seems to be happening less with this new version (0.7),
     and even less in the newest one (0.8), but I'm not sure why (might be my imagination).



==============================
== Specific NSF problems
==============================


 - RC Pro Am - Triangle Channel is fux0red.  Could be the rip?




==============================
== The TODO list  (in no particular order)
==============================


- --all above known issues and specific NSF problems--

- add an installer (blah... give me a rar file anyday)

- re-add IRQ emulation if needed (unlikely)



==============================
== Version History
==============================

------------------------------------------------------
0.851
*  Fixed a bug which would prevent some sound from playing on some NSFs which use
   certain combinations of expansion channels.

------------------------------------------------------
0.85

*  Revised FDS tune loading procedures.  FDS NSFs which don't *quite* follow the
   special FDS bankswapping rules now load properly  (fixes: Exciting Basket,
   Almana no Kiseki, Akai Yousai, and several others).

*  Fixed another related loading bug which could potentially crash NotSo if
   triggered (although it never seemed to be triggered, thankfully)

*  Fixed up the FDS a bit... including correcting a bug which caused some homebrews
   to go insane.

*  Fixed a bug in CPU timing.  Caused streamed PCM audio to sound lower pitched than
   it should.  (fixes:  Blades of Steel, Mitokoumon).

*  Improved the DMC pop reducer so that it won't interfere with streamed PCM audio,
   but will still prevent the usual pops.

*  Corrected FME-07 output (again)

*  Added proper PAL system emulation... as well as adding room in the display to tell
   whether an NSF is PAL or NTSC (or combo).

*  Expansion channels are now reset between tracks (fixes several NSFs which falsely
   claim to use extra chips)

*  Improved "Subclass Winamp" option to catch track changes via keyboard.  It also
   catches the 'play' button on Winamp now.

*  Corrected a display issue with the %t format tag on NSFEs with internal playlists.

*  Various GUI improvements and feature additions.

*  Added an extra "prepass" filter and included options to control the strength of all
   applied filters (as well as the option to disable them).

*  Added options to make NotSo less strict (to help correct NSFs which have rip issues).

*  Fixed a display issue when there's an ampresand (&) in a text field.
   (fixes display on "Wizards & Warriors", etc).


------------------------------------------------------
0.8

*  Added FDS support!  All those FDS tunes now supported.

*  Pseudo-surround sound option for each channel added!

*  Added an N106 Pop reducer (to correct some problems with a few homebrews)

*  Fixed a bug that occured with VRC7 when you adjusted the Master Volume while playing

*  Adjusted/corrected VRC7 instruments (old instruments available by option)

*  Added silence detection.  "Skip song after XX milliseconds" option

*  FME-07 emulation corrected (it was an octave too high before).


------------------------------------------------------
0.7   ** NSF Core rewrite!!!

*  Now emulating the output interdependency between Triangle, Noise and DMC channels.
   (Higher DMC output = quieter triangle/Noise, etc)

*  Fixed a bug in N106 emulation that caused occasional notes to be skipped when played
   too fast.  Fixes 'Final Lap' and several home-brewn NSFs.

*  Added FME-07 support.   'Gimmick!'  now supported!

*  Added VRC7 support!  'Lagrange Point'  now supported!

*  Added FDS -system- emulation, but NOT FDS -sound- emulation.  This will allow all FDS
   NSFs to be played in NotSo, but the extra channel provided on the FDS will not be
   heard.  (Still looking for good docs on FDS sound)

*  Now emulating with full downsampling (all 1789772.7272 samples/sec calculated and
   downsampled to 44100 or whatever samplerate you're playing).  Reduces alaising and
   increases sound quality!  ^^

*  Added a sound filter courtesy of Xodnizel (I believe it's the same filter used in
   FCEU).

*  Revised Triangle linear counter.  (Now behaves as described in Blargg's newer APU doc)

*  Corrected a few previous DMC errors.

*  Enhanced the DMC pop reducer, and gave the option to disable it (for those of you who
   want sound as it sounds on the NES)

*  Removed Bits per Sample option (now always 16-bit output.  8-bit wouldn't work with
   new amplitude emulation or with VRC7 output).
*  Removed Multisampling option (obsolete now, since there's full downsampling)

*  Fixed a GUI bug that prevented the Internal volume from being properly loaded from
   the config options.



------------------------------------------------------
0.68

*  Added support for the Namco 106 chip!

*  Fixed a potential bug in Fast Seeking mode.

*  Fixed a bug that would cause NotSo to tell Winamp bad file titles
   (sometimes no names would get displayed in Winamp's playlist)


------------------------------------------------------
0.65

*  Corrected the Length Counter.  It would previously cause notes to be cut out too soon
   (like Kid Icarus, SMB1, and other Nintendo tunes)

*  Messed with the Triangle's Linear Counter a bit.  This FINALLY fixes track 10 of
   Maniac Mansion.

*  Fixed a problem with the Envelope Decay counter that would prevent decaying if
   the NSF wrote to the register every frame.  Fixes Batman: Return of the Joker.

*  Fixed a similar problem with the Sweep Unit (fixed an NSF, but I can't remember
   which one)

*  Made several adjustments to the DMC.  Fixes The Immorta, Skate or Die 2, Crystalis,
   and several others.

*  Added a minimize button to the File Info dialog (oh boy!  =P)

*  Added a "mini play control" dialog.  For people who wish to have a smaller version
   of the play control dialog.

*  Added Always-On-Top options for the main NotSo Fatso dialog and for the mini
   play control dialog.

*  NotSo fatso now remembers the window's positions.

*  Added a "Subclass Winamp" feature, which makes the Prev and Next buttons in Winamp
   behave like those on the NotSo control dialog.

*  Corrected the frame counter (improves timing a bit)

*  Fixed a bug that would prevent Winamp from opening if you set the IRQ emulation
   mode to Auto-Detect

*  Fixed a bug that would cause Winamp to lock up if you tried to seek when a NSF
   is frozen.

*  Made it so NotSo will jam the 6502 core if it runs into an infinite IRQ/BRK loop.
   This eases CPU usage when NSFs get frozen.

*  Fixed a bug in the play control dialog that would cause weird behavior in the
   track slider.


------------------------------------------------------
0.611

*  Corrected timing issues.  NSFE Playback now reflects NTSC (or PAL) NMI frequency.

*  A few tweaks to the DMC channel to make it "drift" back to center after a sample plays.
   Fixes pops that exist in some songs.  DMC still needs a lot of work.

*  Tweaked $4000 and $4004 registers to prevent them from immediately changing the volume
   is decay is enabled.  Not sure if this is accurate, but it fixes some pops in
   Shin Onigashima.nsf

*  Fixes a bug that would cause Winamp to lock up if you try to seek during an NSF that's
   "frozen"

*  Removed a check that prevented files with play addresses less than $8000 to be loaded.
   Fixes Musashi_no_Bouken.nsf


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

0.61

*  Added MMC5 support.  Shoulda released it with 0.60... thought it would take longer =P

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

0.60 -   **Rewrite from scratch!

*  Added all "undocumented" opcodes.  Should be accurate but I didn't do much extensive
   testing

*  Timing is much more accurate now.

*  Added VRC6 support

*  Added a bunch new features (see config menu and compare it to previous versions)

*  Fixed a lot of buffering instabilities that would cause it to crash if the speed of
   the NSF was set too low or too high.  It'll work with any speed now.

*  Added NSF "shadows" - add individual NSF tracks to Winamp's playlist, rather than
   having one file being like 20 songs.

*  Made the output time display time based on the speed of the NSF rather than the "true"
   output time (so when you speed up the NSF via the Speed Throttle, time will move
   faster).  This keeps track times in tact regardless of playback speed

*  Revamped the way seeking is performed.  It now jumps to exactly the moment you specify
   rather than just getting close (like before).  It's even very accurate in Fast seeking
   mode.

*  Various GUI enhancements / revisions.  Config is still a little sloppy... but that's
   the best I can do for now.



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

0.52 -

*  fixed the 4015 register... due to a bad command ("=" instead of "|="), reads weren't
   returning the length counter state of the channels.  (fixes Maniac Mansion, Gauntlet)

*  fixed the Overflow flag after ADC and SBC commands.  Can't believe it was messed up
   before ^_^.  (Fixes Maniac Mansion)

*  tweaked the 6502 core so that the program counter can point to something OTHER than
   ROM; some nsfs put some asm into RAM and would then jump to it... this would mess up
   before.  (Fixes Altered Beast, Nekketsu Koukou Dodgeball Bu - Soccer Hen)

*  removed the Memory Queue (idea adopted from Nosefart... but it wasn't working out).
   Now writes to pAPU take effect immediatly (fixes DPCM in SMB Doki' Mix, *hopefully*
   any NSFs made with NerdTracker2, and a few others)

*  -removed- Frame and DMC IRQ generation.  They didn't seem to be doing anything besides
   stopping some NSFs from working.  (fixes DQ, DQ2, DQ4)

*  added the option to prevent the play control dialog from automatically popping up

*  added an 'amplify' option (songs were amplified before... but I noticed this made
   me have to adjust the volume when switching from listening to MP3s... so now you have
   the option to shut it off)

*  Notso Fatso now remembers which channels you disabled

*  allowed volume control for each individual channel!

*  allowed pan contorl for each individual channel!  (stereo is actually worthwhile now ;)


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

0.51 -

*  Ditched MFC, doing everything straight through the WinAPI (and some wrappers jointly
   developed by Yona and yours truly).  Doesn't load any files that Winamp itself
   doesn't require... so it should finally work for everybody now.

*  Added more known issues to the list.  As well as the specific NSF problem area.
   Didn't get a chance to fix any of them though.

*  Seems to be incredibly faster.  o_O.  Maybe MFC was more of a drag than I thought.

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


0.5 - First release!  Yowsa!