yep, any language that can use the library would work.
Maybe we can work togehter on this?
The source of the dll is availabe and consist of only 3 files:
mm_WorkerThread.h
mm64.cpp
mm64core.asm
The definition "JNIEXPORT" indicates exported functions, I assume simliar to "__declspec(dllexport)"
There are only 12 exported functions:
1. Java_mm_WorkerThread_getItNative_164a
2. Java_mm_WorkerThread_getItNative_164b
3. Java_mm_WorkerThread_getItNativeEx
4. Java_mm_WorkerThread_getCPUid
5. Java_mm_WorkerThread_getIterationsPTnativeF
6. Java_mm_WorkerThread_getIterationsPTnativeD
7. Java_mm_WorkerThread_getIterationsPTnativeEx
8. Java_mm_WorkerThread_setOrbit
9. Java_mm_WorkerThread_freeOrbit
10. Java_mm_WorkerThread_initRefOrbCoeffsEx
11. Java_mm_WorkerThread_doAuxIterationEx
12. Java_mm_WorkerThread_getIterationsDnative
So, what do they do and how are they called?
If you have converted SuperFractalThing to C++, I assume you have knowledge in Java?
Can you debug MM and see how to use these 12 functions?
If we want to convert this to a C++ project, there is no need to compile the files as a DLL project, and the first parameter of each function, JNIEnv, needs to be implemented.
The jclass parameter is never used so it can be ignored.
I don't have access to Java's SDK, but I was able to compile the code by adding the following piece of code in the top of mm_WorkerThread.h, that defines the used datatypes and implements JNIEnv (although always return NULL):
#define JNIEXPORT __declspec(dllexport)
#define JNICALL
#define jclass void *
#define jint int
#define jdoubleArray double *
#define jfloatArray float *
#define jdouble double
#define jlong __int64
#define jlongArray __int64 *
#define jboolean bool
#define JNI_TRUE 1
#define JNI_ABORT -1
class JNIEnv
{
public:
double *GetPrimitiveArrayCritical(jdoubleArray dbla, jboolean isCopy)
{
return NULL;
}
jlongArray GetPrimitiveArrayCritical(jlongArray jzx,jboolean isCopy)
{
return NULL;
}
void ReleasePrimitiveArrayCritical(jdoubleArray dbla, jdouble* xyzbailout, jint i)
{
}
void ReleasePrimitiveArrayCritical(jlongArray dbla, jlong* xyzbailout, jint i)
{
}
void ReleaseFloatArrayElements(jfloatArray orbxyFref, float * orbxyF,jint i)
{
}
void DeleteGlobalRef(jfloatArray orbxyFref)
{
}
void DeleteGlobalRef(jdoubleArray orbxyFref)
{
}
void DeleteGlobalRef(jlongArray orbxyFref)
{
}
void ReleaseDoubleArrayElements(jdoubleArray orbxyDref, double *orbxyD, jint i)
{
}
void ReleaseLongArrayElements(jlongArray orbxyEref, __int64 *orbxyE, jint i)
{
}
double *GetDoubleArrayElements(jdoubleArray orbxyDref,jint i)
{
return NULL;
}
float *GetFloatArrayElements(jfloatArray orbxyFref,jint i)
{
return NULL;
}
__int64 *GetLongArrayElements(jlongArray orbxyEref,jint i)
{
return NULL;
}
jfloatArray NewGlobalRef(jfloatArray orbitXYF)
{
return NULL;
}
jlongArray NewGlobalRef(jlongArray orbitXYE)
{
return NULL;
}
jdoubleArray NewGlobalRef(jdoubleArray orbitXYD)
{
return NULL;
}
};
Now since I don't have knowledge in Java I don't understand the difference between e.g. GetPrimitiveArrayCritical and GetDoubleArrayElements and NewGlobalRef, which all seems to return arrays of the 3 different datatypes __int64, double and float.