English Amiga Board


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: 43
Posts: 4,043
@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  
Old 02 January 2014, 21:06   #42
Der Wanderer
Registered User
 
Der Wanderer's Avatar
 
Join Date: Dec 2013
Location: Mountain View / USA
Posts: 34
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: 43
Posts: 4,043
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: 43
Posts: 4,043
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: 34
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, 177 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: 34
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
 
Seiya's Avatar
 
Join Date: Nov 2014
Location: Italy
Posts: 2,342
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: 274
>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
 
Seiya's Avatar
 
Join Date: Nov 2014
Location: Italy
Posts: 2,342
ah ok
Seiya is offline  
Old 21 April 2018, 03:16   #50
ZOleg73
 
Posts: n/a
Why is there no 64-bit version of soft3d.dll for use with winuae64?
 
Old 22 April 2018, 08:34   #51
thellier
Registered User
 
Join Date: Sep 2011
Location: Paris/France
Posts: 274
Because I dont know what changes are needed to recompile it as a 64 bits dll
You know I am not a Windows coder so dont know all about this platform
thellier is offline  
Old 23 April 2018, 02:16   #52
ZOleg73
 
Posts: n/a
Question

thellier may be you upload latest sources of Wazp3D?
 
Old 23 April 2018, 10:47   #53
thellier
Registered User
 
Join Date: Sep 2011
Location: Paris/France
Posts: 274
The latests stable sources are on Aminet in Wazp3D package

Then we did a "fork" with Bszili help for Morphos: those changes were never included in main source as it will have need to "merge" and "revise" the two versions to one and I didnt have the time nor motivation to do that

Certainly a new Wazp3D version will happen one day (that will correct the Wazp3D-Prefs bugs...) but I dont know when I will have time do do that
thellier is offline  
Old 25 May 2019, 13:15   #54
turrican3
Moon 1969 = amiga 1985
 
turrican3's Avatar
 
Join Date: Apr 2007
Location: belgium
Age: 48
Posts: 3,913
Is there a way that this stuff help to play amiga dosbox faster ??
or perhaps is it possible to make a midi.dll ??
Could it help to display html5 and things like that ??
Speed up internet browsers ??
What are the possibilities ???

EDITED: just think about it : could this trick be used for sdl libraries ??? it could be really interesting. Or png or 040 and 060 math libs ??? Sorry but i don't know the limitations of this stuff.

Again sorry for my noob question ! but please if you can give me a short answer.
I think about it because i would like to make an amiga like computer, hidding windows, but the big problem is youtube, java,etc...

Last edited by turrican3; 25 May 2019 at 13:44.
turrican3 is offline  
Old 28 July 2019, 22:07   #55
Zilog
Registered User
 
Join Date: May 2014
Location: Italy
Posts: 419
Hi,
i search of write x86 dll, but i have the problem:


A) for use "winuae_opendll" in amiga c program how file include this function?


B) When find ultimate winuaesupport.h


Thanks a lot for help.
By.
Zilog is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
native x86 code in WinUAE? Falk support.WinUAE 20 21 January 2023 18:30
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
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 06:54.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.28099 seconds with 16 queries