Ganbatte! v2.2 .D00 file player plugin for WinAmp by OPLx (oplx@yahoo.com)
--------------------------------------------------------------------------
Ganbatte is Japanese for "perserverance", and I must say that without perserverance, this plugin might never have been
completed.

======================================================================
|PLEASE READ THIS FILE BEFORE USING THE PLUGIN!!!!!!!!!!!!!!!!!!!!!!!|
======================================================================

[LEGAL]
I have thoroughly tested this player/plugin on my computer.  I can not be held liable or responsbile for any damages that it
may cause to your computer.  If you don't feel comfortable using this plugin in, please DO NOT RUN it and DELETE it from your
machine.  The two files to delete are:

in_d00.dll
in_d00.txt

They should be installed in the WinAmp\Plugins directory (or where ever you have chosen).

Ganbatte! may not be sold individually, or sold as a part of a commercial package for any reason whatsoever. IT IS FREE.
------------------------------------------------------------------------------------------------------------------------

~~~[Visit my page totally dedicated to FM audio @ http://www.oplx.com/]~~~

[Introduction]

What does this plug-in do?
--------------------------
Well, it doesn't cook breakfast or make coffee for you. ;-)  But it does playback .D00/.D01 music files using an OPL2 FM
synthesizer emulator.  Meaning that you don't actually have to have a soundcard with this chip present.

What is the .D00 format?
------------------------
The .D00 format is an oldsk00l music file format (like .MOD, .S3M, .XM, etc), though quite different in how it stores music
information.  It's only close comparison to the Amiga TFMX file format created by Chris Huelsbeck.

This file format was created by Jens-Christian Huus of the popluar C64 music group Vibrants for the the Yamaha YM3812 (OPL2)
FM synthesizer chip found in the original Adlib Sound Card and the Sound Blaster line of cards.  Unfortunately, this chipset
never really got fully used to its potential as the onslaught of the wavetable cards soon appeared on the PC.

So the OPL2 is dead, why make a player for it?
----------------------------------------------
I guess it's nostalgia more than anything.  I REALLY love the sound the OPL2 makes, and I realized that eventually the
OPL2 FM sythesizer chip in the years to come will more or less disappear from PCs, I wanted to preserve some of the songs
I had composed on the synthesizer chip.  The .D00 format is one format I used, and the .ROL format is the other.  PLUS I
wanted the world (or whoever cares to listen) to be able to enjoy some of the finest FM chip tunes you will ever hear on
the PC created by the Vibrants.  The Vibrants are composing more in the digital formats (wavetable, MP3, OGG), but their FM chip
tunes are incredible (in my opinion).  Oh, and the .D01 files with sample data is awesome.  FM+samples is something truely
worth beholding (with one's ears).

Where can I find .D00 files?
----------------------------
The Vibrants Homepage:  http://vibrants.dk/adlib.htm
Or @
http://www.oplx.com/code/d00songs/mtladlib.zip
http://www.oplx.com/opl2/trackers/edlb105a.zip
http://www.oplx.com/code/d00songs/v-adlib.zip
http://www.oplx.com/code/d00songs/AdLib_Drax_Work.zip

Be sure to check out the other Vibrants songs.  They're really cool!  :)

I wanna create some stompin' FM muzaks, how can I do this?
----------------------------------------------------------
You can get the DOS version (and only version) of the .D00 tracker called Edlib
from http://www.vibrants.dk/downloads/v-ed105a.zip or do a file search for edlb105a.zip.
Since it is a DOS based program, you're going to need DOS, and of course a good sound card.  If you own a wavetable only card, sorry.
DOSBox is also a fine alternative.  You can grab that from here:  http://dosbox.sourceforge.net/

[Using real hardware]
---------------------
I've found out that a lot of the soundblaster clones out there (and some of Creative Labs' more recent sound cards AWE64
and up) aren't 100% compatible with the OPL2.  If you want guaranteed compatibility here are the cards/chipsets I recommend
(if you can find them):

* The original Adlib Music card - you probably won't find this one.  ;)
* Any Sound Blaster Card from v1.00 through Sound Blaster 16/Vibra.  Anything above this isn't 100% compatible.
* Any Yamaha sound card using OPL3SAx, Waveforce192XG, YMF289B, YMF715E chipsets.
* Any card that uses a true Yamaha OPL2, OPL3, or OPL4 chipset.
* ESS1887 chipsets - I'm not deeply familiar with ESS' (http://www.esstech.com) chips, but the 1887 one I owned was 100%
  compatible.

You can still use the soundblaster clones to write music; they generally work.  The song STR_WISE.D00 is a good test to
determine whether the sound card is 100% compatible with the OPL2.  On 100% compatible chips, the bass line is very evident
and prominent.  But on the chips that aren't compatible, the bass line is stacatto.

[Emulation]
-----------
DOSBox ( http://dosbox.sourceforge.net/ ) uses an almost accurate YM3812 emulator.  If you don't have access to real hardware, this is probably
the best alternative.

[Future]
--------
* Perhaps .D00/.D01 tracker.  Don't hold your breath on this one though.  I generally don't have much time to code
  at home these days.

[Technical Stuff]
-----------------
The v0.00 player is based on JCH's DOS v0.10 player.
The v1.00 player is based on JCH's DOS v1.03 player (for the .D01 format).
The v1.00 player is based on JCH's DOS v1.14 player.
The v2.00 player is based on JCH's DOS v2.02 player.
The v3.00 player is based on JCH's DOS v3.03 player.
The v4.00 player is based on JCH's DOS v4.00 player.
The YM3812(OPL2) software emulator created by Tatsuyuki Satoh & Jarek Burczynski is used for the audio playback (quite accurate I must say!)

[Special Notes]
---------------
The plugin contains the sample for ALL 3 .d01 files; there are only 3 in existance.  How do I know?  'Cause JCH himself
said so! :)  Either case, if somehow, somewhere someone manages to create a .d01 file, the plugin will play it.  What
happens is that the plugin searches for the .s01 file that contains the samples.  If the file doesn't exist, it tries to
then see if the .s01 file is a resource in the plugin.  If not, the plugin just plays the FM portion of the music.  But
trust me, you definately want to have sample data with the .d01 songs ... sounds SO much better.

[History]
---------

v2.2 - (07/14/2008)
-------------------
* Fixed bug in core library (version 0 files wouldn't play)

v2.1 - (06/07/2007)
-------------------
* Misc. updates to the core player library.
* Fixed minor bug in song selection subclassing

v2.0d - (09/02/2006)
--------------------
* Misc. updates to core player library.

v2.0c - (06/22/2006)
--------------------
* Added check to ignore .D00 files with invalid player version numbers.

v2.0b - (01/09/2006)
--------------------
* Reduced minimum required output buffer size; should fix "no sound" problem with output plugins
* Re-worked internal loading system.

v2.0a - (01/01/2005)
------------------
* Fixed tiny bug in selection of next subsong in Winamp (thanks deus-ex!)

v2.0 - (11/11/2004)
-------------------
* All players re-written from scratch
* Loop detection
* Song forwarding/rewinding
* Various bug fixes

v1.12b - (06/10/2004)
---------------------
* Updated to use v0.72 YM3812 emulator
* Changed URL link
* Never released publicly

v1.12a - (07/04/2002)
---------------------
* Minor bugfix for URL link in about menu (now works under Win2k)

v1.12a - (12/30/2001)
---------------------
* Updated to use v0.37a YM3812 emualtor

v1.12  - (04/05/2001)
---------------------
* Added support for v1.00 .d01 files. -- Took me long enough ... he he he

v1.11  - (09/23/2000)
---------------------
* Added support for v0.00 .d00 files.  All that's left is the .d01 player (which is now 70% complete)!
* Updated player to use v.37 FM emulator - slightly improved sound accuracy.

v1.10x - (08/08/2000)
---------------------
* Added support for direct use of WinAMP's forward/backward buttons.
* Smaller .dll size.

v1.10 - (06/30/2000)
--------------------
* Added support for v1.00, v2.00, and v3.00 .d00 files.  Should cover everything out there(?) except for the
  v0.10 .d00 format and the .d01 format.

v1.00 - (02/13/2000)
--------------------
* First public release.

v0.5a - (02/20/1999)
------------------
* Completed v4.00 player