View Single Post
Old 28 December 2013, 23:17   #14
Der Wanderer
Registered User

Der Wanderer's Avatar
Join Date: Dec 2013
Location: Mountain View / USA
Posts: 32
The emulation freeze is indeed a problem, because the native function is not subject to the AmigaOS task scheduling and would freeze the entire emulation until the function call returns. This is ok for short function calls, but of course a disaster for lengthy calls.

I had the idea that lengthy calls could be run in a separate host-thread and the calling AmigaOS task is put to sleep, until the host thread returns. This way it behaves like a normal blocking call but does not stop emulation and other 68K tasks. AmigaOS would even get some kind of limited multi core support.

However, whatever you guys do, keep it simple. I managed to write a native library (a pair of Amiga Shared Library and DLL) for WinUAE, but it was not that straight forward and is a little ugly/unsafe here and there. A little more complicated would have scared me away.
What I don't like is that the installation of this library must modify the host system file system. It is not possible to install the library on Amiga side only, e.g. it cannot be installed by an installer.
You can install the Amiga Shared Library, but still must manually copy the .dll to WinUAE directory or Win32 folder.

You could push the idea further and patch OpenLibrary in a way that it can open directly DLL or SO. This way all the glue code would become obsolete and creating a native library becomes really easy, plus you can install the 68K equivalent in parallel, if the AmigaOS install will run in a different environment that doesnt support native libs.
Der Wanderer is offline  
Page generated in 0.03910 seconds with 10 queries