﻿Ganbatte! v1.0f .D00 file player plugin for Foobar2000 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:

foo_ganbatte.dll
foo_ganbatte.txt

They should be installed in the foobar2000\components 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]
---------

v1.0f - (11/02/2009)
--------------------
* Fixed bug where internal resource .s01 files georgeous.d01 and theadlibi.d01 were missing.
* compiled against 2008-11-29 SDK (works with foobar v0.9.6.9)
* ran on multiple-core system ... no problems apparently. :-/

v1.0e - (07/14/2008)
-------------------
* Fixed bug in core library (version 0 files wouldn't play)
* Recompiled to use foobar SDK 0.9.5
* dual-core problem probably still exists ... no dual-core machine (yet)

v1.0d - (02/13/2008)
--------------------
* Recompiled to use foobar SDK 0.9.4
* Apparently there's some kind of problems with the plugin on dual-core machines ... alas I don't have a dual-core system (yet) for debugging

v1.0c - (06/07/2007)
-------------------
* Misc. updates to the core player library.

v1.0b - (09/02/2006)
--------------------
* Added support for v0.9
* Misc. updates to core player library.

v1.0a - (06/22/2006)
--------------------
* Added check to ignore .D00 files with invalid player version numbers.
* Support for v0.9 coming ... eventually

v1.0 - (01/09/2006)
--------------------
* Initial release