rabiddeity
Plugin Hacker
Not sure if this has been fixed in the 1.7 chain or not, but these are things that are broken in 1.6.
I'm hacking around, overhauling NRage's input plugin, and I've noticed a few things that REALLY need to be fixed in PJ64. (And if you say "Use another emulator" you're completely missing my point.)
1. Controller spec 1.1 support is broken. If I return PluginInfo->Version = 0x0101 to GetDllInfo, the plugin doesn't show up at all in the plugin selection dropdown. I'm running traces in the debugger so I know it's attaching and returning the right value, and of course it works if I run under 1.0 spec with the older InitiateControllers format. C'mon, guys, it's a pretty good spec, but if you release a spec with your emulator (in the docs folder) I expect it to work in your emulator!
2. CloseDLL is called when it shouldn't be. According to the spec, "This function is called when the emulator is closing down allowing the dll to de-initialise." Here's the normal chain of calls:
(DLL loaded)
InitiateControllers
:ROM list shows up,
:I double-click a ROM to load it
CloseDLL
(DLL unloaded)
(DLL loaded)
InitiateControllers
:ROM finishes loading
RomOpen
...
RomClosed
CloseDLL
(DLL unloaded)
So that works fine. Now if I start with a different plugin loaded up, say Jabo's Directinput 7...
:ROM list shows up,
:go to Options->Settings...
(DLL loaded)
(DLL unloaded) // this is for enumeration, obviously
:select my plugin from the list
(DLL loaded)
:click OK
InitiateControllers
:Rom list shows up,
:double click a ROM to load it
CloseDLL
InitiateControllers // crashes here because I dealloc'd everything in CloseDLL
Notice something wrong? According to the spec, CloseDLL isn't supposed to be called here, because the DLL is never closed and unloaded.
Sure, it's an easy fix, just move all my dealloc stuff to DLL_PROCESS_DETACH... but obviously the CloseDLL func isn't called when Zilmar said it should be.
Are both these fixed in 1.7?
I'm hacking around, overhauling NRage's input plugin, and I've noticed a few things that REALLY need to be fixed in PJ64. (And if you say "Use another emulator" you're completely missing my point.)
1. Controller spec 1.1 support is broken. If I return PluginInfo->Version = 0x0101 to GetDllInfo, the plugin doesn't show up at all in the plugin selection dropdown. I'm running traces in the debugger so I know it's attaching and returning the right value, and of course it works if I run under 1.0 spec with the older InitiateControllers format. C'mon, guys, it's a pretty good spec, but if you release a spec with your emulator (in the docs folder) I expect it to work in your emulator!
2. CloseDLL is called when it shouldn't be. According to the spec, "This function is called when the emulator is closing down allowing the dll to de-initialise." Here's the normal chain of calls:
(DLL loaded)
InitiateControllers
:ROM list shows up,
:I double-click a ROM to load it
CloseDLL
(DLL unloaded)
(DLL loaded)
InitiateControllers
:ROM finishes loading
RomOpen
...
RomClosed
CloseDLL
(DLL unloaded)
So that works fine. Now if I start with a different plugin loaded up, say Jabo's Directinput 7...
:ROM list shows up,
:go to Options->Settings...
(DLL loaded)
(DLL unloaded) // this is for enumeration, obviously
:select my plugin from the list
(DLL loaded)
:click OK
InitiateControllers
:Rom list shows up,
:double click a ROM to load it
CloseDLL
InitiateControllers // crashes here because I dealloc'd everything in CloseDLL
Notice something wrong? According to the spec, CloseDLL isn't supposed to be called here, because the DLL is never closed and unloaded.
Sure, it's an easy fix, just move all my dealloc stuff to DLL_PROCESS_DETACH... but obviously the CloseDLL func isn't called when Zilmar said it should be.
Are both these fixed in 1.7?