English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 02 January 2014, 19:35   #41
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 36
Posts: 3,368
@Der Wanderer I am now self-supplied with simple test programs, but I would like to test more real-world programs - specifically I want to test that the "WinUAE compatibility layer" (compatibility with the existing native interface) is actually compatible...

So if possible, I would appreciate a preconfigured test setup with synth.dll and something Amiga-side which uses it. I can then test that with FS-UAE for windows/x86 (*).

(*) Note, it will only work in FS-UAE as long as there is no WinUAE-specific behaviour. For example, if the amigawnd member of the "a6 struct" is used it will not work.

You'll also be happy to hear that the new interface is largely interoperable with the old. You can open a native library with the new interface and use the functions via the old - or vice versa. So one can for example port code over gradually to use the new async functions (or even keep using the old interface if so desired).
FrodeSolheim is offline  
AdSense AdSense  
Old 02 January 2014, 21:06   #42
Der Wanderer
Registered User

Der Wanderer's Avatar
 
Join Date: Dec 2013
Location: Mountain View / USA
Posts: 32
The reason why you want me to test this is also to see if someone else than you (and maybe Toni) is able to understand and handle what you fiddled out. Otherwise, there wont be much usage of this feature.

I will make you a small example, based on the tiny AmigaOS install I have sent you. If you want to hear the result of synth.dll, ahi will be required. I can set the samplerate to 16kHz, so you can use Paula driver for now.
Der Wanderer is offline  
Old 02 January 2014, 21:22   #43
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 36
Posts: 3,368
An example with paula output would be nice, as I wouldn't hear anything otherwise

The new stuff is not more complicated the the old stuff (a bit more complicated internally, but that's not visible to users of the feature).
FrodeSolheim is offline  
Old 03 January 2014, 20:23   #44
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 36
Posts: 3,368
uaenative.library implementation is more or less complete now, with async mode too - I have also created a simple uni-create-wrapper.py script which takes a native library and generates wrapper functions for ease of use. Here's how usage looks now:

Example native library:

Code:
#include "uni_library.h"
#include <stdio.h>

UNI_DEFINE_LIBRARY (1, NULL);

UNIAPI void UNICALL hello_world (struct uni *uni)
{
    uni_char *data = UNI_PCHAR_PARAM (d1);
    uni_long data_len = UNI_LONG_PARAM (d2);
    snprintf (data, data_len, "Hello World!\n\nBest regards, %s",
              uni->get_uae_string());
}
Example Amiga program using the auto-generated wrapper functions (wrapper name "hwlib" chosen when generating the wrappers - tested using GCC 2.95.3 cross-compiler for m68k-amigaos):

Code:
#include "hwlib.h"

static char data[128];

int main (int argc, char *argv[])
{
    if (!hwlib_open ()) {
        printf ("error opening hwlib: %lx\n", hwlib_get_last_error ());
        return 1;
    }
    hwlib_hello_world (data, 128);
    printf ("%s\n", data);
    hwlib_close ();
    return 0;
}
The advantage of using the wrapper functions, besides ease of use, is that you also get parameter checking due to having proper C function prototypes, and the arguments are sent through the correct registers automatically

(You can of course just use uaenative.library directly, more or less like the old native interface - except you perform library jumps instead of an absolute jump).

Last edited by FrodeSolheim; 05 January 2014 at 11:09.
FrodeSolheim is offline  
Old 06 January 2014, 08:04   #45
Der Wanderer
Registered User

Der Wanderer's Avatar
 
Join Date: Dec 2013
Location: Mountain View / USA
Posts: 32
Here is a little test for the native DLL interface for WinUAE. It can be used to test compatibelity with the native Interface on FSUAE.

It gives me about 4 times speedup on this setup, some algorithms benefit more and some less. The test must be run several times to get a feeling for the actual speed, as it seems to confuse the timer.device when jumping to native code sometimes.

Installation:
The 68K "synth.library" goes to Libs:
The x86 "synth.dll" goes to to the path of your WinUAE.exe

There are two 68k executables to run under AmigaOS, one uses the 68K library, and one the x86 .dll through the WinUAE .dll interface.
Attached Files
File Type: zip nativetest.zip (144.2 KB, 54 views)
Der Wanderer is offline  
Old 06 January 2014, 20:22   #46
Der Wanderer
Registered User

Der Wanderer's Avatar
 
Join Date: Dec 2013
Location: Mountain View / USA
Posts: 32
The test program renders a wave sample that sounds like a bass string of a guitar using physical modelling of a bowed string.

Strangely, the native version adds some ringing oscillation to the sample as the delay progresses. I have no idea why that is. So somehow the float calculations seem to be different in WinUAE than in the .dll. This is really wiered. I tried lots of setting in Visual Studio influencing the float model precision etc. but nothing helps.
Der Wanderer is offline  
Old 03 May 2017, 11:24   #47
Seiya
Registered User

 
Join Date: Nov 2014
Location: Italy
Posts: 293
no hope that someone continuing QuarkText development?
Seiya is offline  
Old 04 May 2017, 16:01   #48
thellier
Registered User
 
Join Date: Sep 2011
Location: Paris/France
Posts: 148
>continuing QuarkTex development?

For what usage as Wazp3D almost do the same ?


QuarkTex do :
Warp3D.library to OpenGL32.dll wrapping (hardware accelerated)
agl.library (StormMesa) to OpenGL32.dll wrapping (hardware accelerated)


Wazp3D do :
Warp3D.library to OpenGL32.dll wrapping (hardware accelerated)
(in fact 1% of Wazp3D code come from QuarkTex source)
Dont wrap agl.library (StormMesa) but just use an updated agl.library (StormMesa2010) with less bugs (it call Warp3D.library so is somehow hardware accelerated too)



Alain Thellier - Wazp3D
thellier is offline  
Old 04 May 2017, 19:28   #49
Seiya
Registered User

 
Join Date: Nov 2014
Location: Italy
Posts: 293
ah ok
Seiya is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
MSVC100.dll error WinUAE 64 MrX_Cuci support.WinUAE 1 26 February 2013 22:21
WinUAE and Windows dll... Gilloo support.WinUAE 1 19 June 2012 16:46
How easy to port WinUAE to non x86? Silver support.OtherUAE 13 19 November 2008 20:52
native x86 code in WinUAE? Falk support.WinUAE 15 14 June 2008 12:58
SFS x86 native for WinUAE? YoJoe! support.WinUAE 8 17 October 2007 11:40

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:37.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.15115 seconds with 12 queries