Page 2 of 4

Posted: Sat Dec 11, 2010 6:26 pm
by GradualGames
The famitracker plugin system should now, I think, be usable and accessible. You can compile a plugin with g++ under cygwin at least, but any win32 compiler should work fine. The interface consists of pure C functions. There are no MFC dependencies.

See the top of the thread for a snapshot download for anyone interested in playing with the plugin system.

Posted: Sat Dec 11, 2010 8:20 pm
by cpow
Banshaku wrote:New light programming should be made in .net anyway and with the included framework, there is no reason to not do so.
Barf!

<Sorry...just couldn't resist!>

Posted: Sun Dec 12, 2010 10:05 am
by GradualGames
At the top of this thread, I've posted a link to a compiled ROM demo of the example sound engine, and the original famitracker song from which the data used in the ROM was exported. Press "A" to hear a sound effect.

Posted: Sun Dec 12, 2010 11:00 am
by clueless
Gradualore wrote:I wouldn't mind sending a binary of the example plugin dll to anybody interested. Just send me a pm.

Actually, here it is. Just drop it in a folder called "plugins" next to famitracker.exe. Then, the export dialog should list "SoundEngine" as one of the file formats.

I'm having trouble with Famitracker's export functionality.

I've downloaded Famitracker 0.3.6 beta 4 to my Windows XP PC.
I created a directory called "plugins" at the same level as FT.
I've installed both export plugins mentioned in this thread.
I saved your "example_song.ftm" to my desktop.
I fire up FT, and open up your FTM file.

Now I look in all of the menus and I can't find any that read "export".
The "save as" only lets me select "FTM" file types.

What have I done wrong?

Code: Select all

C:\>dir C:\opt\famitracker /s/b

C:\opt\famitracker\FamiTracker.chm
C:\opt\famitracker\FamiTracker.exe
C:\opt\famitracker\Plugins
C:\opt\famitracker\Plugins\SoundEngineExporter.dll
C:\opt\famitracker\Plugins\TextExporter.dll

Posted: Sun Dec 12, 2010 11:02 am
by Shiru
It is in File>Create NSF (in the Type of file dropdown list).

Posted: Sun Dec 12, 2010 11:05 am
by clueless
Shiru wrote:It is in File>Create NSF (in the Type of file dropdown list).
I must have done something else wrong. Under "type of file", my only options are NSF, NES, BIN, PRG.

EDIT: Procmon shows that FT did indeed open the two DLLs in the plugins directory. Procexp shows that they are loaded into FT's address space.

WTF: My computer hates me. The export options are available now. Damned Heisenbugs.

I apologize for the trouble.

EDIT2: I take it back. The options are missing again. WTF!!!! The export options are only listed when I monitor the process with ProcMon.

My normal user account lacks admin rights (principle of least privilege). I am not sure what is going on at the moment, but I suspect that it is a file permissions issue on my end.

Posted: Sun Dec 12, 2010 11:19 am
by clueless
I've figured it out.

Famitracker looks for the "plugins" directory relative to the processes current working directory (which is normally whatever directory contains the FTM file that I double-clicked on from Windows Explorer).

Famitracker should instead use the win32 api "GetModuleFileName (NULL, ....)", then strip the EXE off with "PathRemoveFileSpec", then append "Plugins" with "PathAppend" (or at least, that is how I would do it).

I suppose I'll create an account on FT's forums and post a bug report over there.

EDIT: http://famitracker.shoodot.net/forum/posts.php?id=1511

Posted: Sun Dec 12, 2010 1:24 pm
by GradualGames
*edit* You're quite right. Yes, that should be fixed. Thanks for the bug report. I probably never found this because I always run famitracker first, then open a file.

Posted: Sun Dec 12, 2010 1:57 pm
by GradualGames
@clueless, this has been fixed, using your suggestion. Thanks! I'm not sure if this is quite drastic enough to issue yet another development snapshot; but let me know if you'd like one anyway. *edit* Nevermind, here's a second build from today with a fix for the bug clueless found: Dev snapshot, December 12th 2010, build 2

Posted: Sun Dec 12, 2010 2:13 pm
by clueless
Gradualore,

Nope, I'm good for now. Thanks for the offer though.

What software license do you plan to attach to your own music player (ca65 src)?

Posted: Sun Dec 12, 2010 2:17 pm
by GradualGames
I haven't given much thought to a license. I intended it to be an example so as far as I am concerned it is public domain and you can do whatever you like with it, improve it, etc.

Posted: Fri Dec 24, 2010 10:17 am
by GradualGames
DPCM support has been added to the plugin system. Shiru's FamiTone player looks to be fulfilling what I wanted for the plugin system. There is a development snapshot available at the top of the thread as well as a link to Shiru's FamiTone player thread.

Posted: Sun Dec 26, 2010 10:37 pm
by ManicGenius
This thing has the same problem it always has for me, the plugin shows up on the menu for Create NSF... but... it won't export anything. Just closes the save dialog and sits there like nothing happened.

Posted: Mon Dec 27, 2010 11:03 am
by GradualGames
Thanks for posting about your problem, without feedback this will not get off the ground. PM coming.

Posted: Tue Jan 25, 2011 12:50 pm
by GradualGames
ManicGenius's problem was corrected by installing the Visual Studio 2008 runtime. We believe that this is only a problem in how I compiled the example binary for the plugin.

Jsr has released the new Famitracker v 0.3.6 on the famitracker website. He updated a link to the latest source for the example plugin and driver, however there is not yet a binary available. I will make one available soon and will update this thread accordingly.

According to Jsr there are plans to create a "plugins" section on FT's wiki which would list exporter plugins developed for famitracker. Currently there are two: the example exporter/driver, and Shiru's text exporter/FamiTone.