Pete´s Messageboard... No ISO/BIOS requests!

Homepage Members Register Login Search Old board


Neuer Thread ...


AuthorTopics » Book an abo for this threadClose Thread Move Thread Fix the thread Print view Delete this thread

bamboo 



...

Status:Offline
Date registered: 05.10.2012
Post:1
Send Message
...   Created on 05.10.2012 - 17:35Jump to top Quote this post Report this post Edit Delete


Hello, Pete,
and hello to all of you emulation/programming maniacs out- (and in-) there... I decide to write to your messageboard, because I think it's the appropriate place for the issue.
I would like to discuss (excuse my English...) one issue that bugged me for 2 days now, but at the end I found a solution to it and like to inform other people about "my big knowledge" .
And the issue is as follows:
I consider myself a "Street Fighter Fan" (and I believe many of you do so) and as such I heavily wanted to be able to play or at least to run the 3D installment of the series, called "Street Fighter EX". So I do some research and find out that only emulators that emulate these games are MAME (the newer and heavier versions of it), Impact (a very old and buggy and outdated and not-so-stable emulator) and the ZiNc emulator - in other words, emulators that implement Sony ZN hardware emulation. You can easy predict which of the three I choose to try with... yes, I prefer to work with the ZiNc emulator, and although it's a little bit of "oldish" already, it's stable and runs decent in most cases.
Like many other people around the net I decide to try what external plugins suits me best and that's how I stumbled upon your site... and btw it's awesome. I decide to try the P.E.Op.S. DSound SPU plugin BUT here's the issue - everywhere I look and in every documentation I read (including yours) about how to set and run external PSX plugins with ZiNc I find the same thing:

"...
Pete added the ZiNc sound plugin interface. That means
you can now use the P.E.Op.S. spu plugin with the ZiNc
emu...

Please note that in Windows you will need a psx emu
like ePSXe to change the plugin settings (since you
cannot access the plugin's config window with the
ZiNc Windows version... well, maybe some ZiNc frontend
coder will take care about that.
...
"

and also:

"...
Please note that the Windows version of ZiNc has no native GUI, so
if you want to change the spu plugin's configuration (like the reverb
or interpolation settings), you will need a freeware psx emu (like
ePSXe) to start up the plugin's config window. Since the configuration
is stored globally in the Windows registry, the same settings will
apply to ZiNc as well.
...
"

After reading this, one might say that using (and configuring) your plugin without downloading and running a PSX emulator is impossible. Well, that buged me A LOT. So I would have to:
1. Search the web for a list of valid PSX emulators
2. Read a lot of documentation to be able to set and run (successfully) such an emulator
3. Download the emulator and do all the copy/paste/delete/rename/extract/download-resources/search-for-bioses/abort/retry/fail... stuff to run it.
4. Every time I want to change some settings in the plugin in order to use it with the ZiNc emulator first I would have to run the other (PSX) emulator, made the changes, exiting the other emulator and then running the ZiNc emulator which will load the plugin with the current settings...
Fhheewww... what a mind job... But the plugin's and emulator's binaries told me something else.
The PSX emulator calls that "hardly accessible" SPU plugin configuration window from the plugin itself. The code, needed for the window to exist is IN the plugin - after all the plugin is nothing else, but an executable DLL. So why do we have to start a GUI PSX emulator to tell it to call the config window for us - can't we do it ourselves? Yes, we can. With the help of a command. But don't fear - every ZiNc user know that you would not escape from typing one or two commands/config settings (in average case it takes about 20 to say... 100) before be able to start the emulator in a way WE WANT IT to work.
The thing is that we need some way to call that plugin (load it in the system memory) alone. We don't have to download some fancy third party applications to do it... because we already have one. Windows system support (the system that is) has a tool, named "rundll.exe" and its big brother "rundll32.exe". These programs load a given DLL executable in the memory and operates with it the way the user wanted to (at least in the sunny days ).
"rundll32" is for 32-bit DLL binaries
"rundll" is for 16-bit binaries (for more info about that read the article at http://support.microsoft.com/kb/164787.
Because P.E.Op.S. SPU plugin (and all the other plugins I belive) is a 32-bit DLL binary file with appropriate resources, function calls, computing logic and function entry points in it (calling exactly that mysterious plugin config), all we have to do is type one single command in a command prompt (the console that is), calling "rundll32", telling it to load the SPU plugin binary and pointing it to the desired entry point in the binary which starts the config window. This is how I does it first and it worked for me:

Code:
1:
 
%SystemRoot%\system32\rundll32 .\sound.znc,SPUconfigure

I call sound.znc because I already rename the P.E.Op.S. spuPeopsDSound.dll into sound.znc for the ZiNc emulator to be able to work with it (well, I can't solve this problem - if anyone finds some workaround for the renaming just let me know). The good news is that we don't have to type everytime we want to run the ZiNc emulator with the new plugin - I use a simple batch file for the job that let me choose between popping the config window or viewing the plugin's 'About' info (which is also coded in the binary):

Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
 
@echo off

echo Available options:
echo.
echo   cfg - Opens configuration dialog
echo   abt - Shows the 'About' info
echo.
set choice=
set /p choice="The system expects your choice: "
if '%choice%'=='cfg' goto cfg
if '%choice%'=='abt' goto abt

:quit
echo Your input is not a valid option.
echo bye-bye...
pause > nul
goto eof

:cfg
%SystemRoot%\system32\rundll32 .\sound.znc,SPUconfigure
echo bye-bye...
pause > nul
goto eof

:abt
%SystemRoot%\system32\rundll32 .\sound.znc,SPUabout
echo bye-bye...
pause > nul
goto eof

:: sound.znc is the new (not the original) name
:: of the P.E.Op.S. PSX SPU plug-in called spuPeopsDSound.dll
:: (or somewhere a.k.a. spuPeopsSound.dll)
:: The ZiNc's default (native) SPU sound driver is then renamed
:: to sound-native.znc to avoid name dublicating

@echo on

It prints the following result when I execute the batch file:

Code:
1:
2:
3:
4:
5:
6:
7:
 
Available options:

  cfg - Opens configuration dialog
  abt - Shows the 'About' info

The system expects your choice: cfg
bye-bye...

So I'm able to make my settings just with double click the mouse (no emulators needed as said in the docs). I assume you will run the batch from the ZiNc's directory, otherwise you'd have to point the full path to it into the batch. For simplicity you can assign your paths to a system variables and only use the (shorter) variable names in the batch calls, for example like that:

%SystemRoot%\system32 becomes variable sys32; Your ZiNc directory's full path (holding the sound.znc binary) becomes variable ZiNc. This way you gone to use only %sys32% and %ZiNc% respectively, where it is needed, instead of the full paths. Like that:

Code:
1:
 
%sys32%\rundll32 %ZiNc%\sound.znc,SPUconfigure

Actually, we do nothing more than calling the internal entry points "SPUconfigure" for the SPU config dialog and "SPUabout" for the SPU 'About' info. And yes, don't forget to rename your old sound.znc that comes with the ZiNc emulator into something else or move it away.
...Lets just stop here, as I wrote too many words for such a little issue, but I'm excited and wanted to share it with someone... because ZiNc has a potential. Thank you (Pete and the P.E.Op.S. team) for the time spent and the job done.
Have a good year!





Signature
Gonna be the next Steve Jobs... Gonna be... "Quit Jobs"


Similarly threads:
Topics Created by Replies Boardname
Linux OSS plugin with device configuring Tosh2o 0 pete_bernert
Can"t see openGL plugin in the list while configuring ( already read faq) Rhymnoceros 0 pete_bernert
P.E.Op.S. PSX Sound plugin v1.9 - Zinc aceofbase 4 pete_bernert
Very slow opengl2 plugin, windows 7 (ZINC) dukejp 5 pete_bernert
PLugin Issue Vumpire 1 pete_bernert
Neuer Thread ...





Masthead

This forum is a free service of razyboard.com
Do you want a free forum in less than two minutes? Then click here!



Verwandte Suchbegriffe:
psx spu plugin | zinc sound plugin | zinc sound plugins | spu plug in for psx emulator
blank