English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 20 June 2003, 22:39   #1
Falk
 
Posts: n/a
native x86 code in WinUAE?

Hi!

Is it possible to develop amiga programs, libraries, datatypes ... which are able to execute directly x86 code in WinUAE to get more speed .. like in Amithlon f.i.? And if .. is there existing such software yet?

If WinUAE doesn't support this yet - is it planned for the future? Like on real Amigas with PPC processor for instance where software over WarpOS could directly execute PPC code.

Greetings
 
Old 21 June 2003, 02:42   #2
RoKo
 
Posts: n/a
An Amiga program can call Windows DLLs.
Bernd Roesch's video player/recorder does it (on the WinUAE download site).
And my QuarkTex does it.
 
Old 21 June 2003, 20:14   #3
Falk
 
Posts: n/a
sounds great

the QuarkTex is nice, respect .. and works good .. there is only a white small box around the mouse pointer on every Warp3D application I tried.

hmm .. I want to have some datatypes native f.i. JPEG to get more speed .. since I've installed OS 3.9 under WinUAE its lame .. and for browsing.
is it possible? I have no really idea cause I have no experiences in Windows coding.
 
Old 22 June 2003, 00:50   #4
mdwh2
Registered User
 
Join Date: Jun 2003
Location: UK
Posts: 14
I've been wondering about this too - I see that it is possible and I'm interesting in writing programs to make use of it myself, but I've haven't been able to find much at all about how to do it. I did find http://www.winuae.net/files/winuae_vidrec.lha which contains some source, but isn't enough to make sense to me (assembly language mixed in with BlitzBasic isn't something I understand well..)

Does anyone have any pointers to some documentation or examples?
mdwh2 is offline  
Old 22 June 2003, 17:21   #5
mdwh2
Registered User
 
Join Date: Jun 2003
Location: UK
Posts: 14
Okay, I've now managed to work out how to call Windows DLLs from Amiga programs using a mixture of C and assembly (is it possible to do it in pure C?), so I guess it wasn't too hard at all

But some things are still eluding me. Like how does one get access to the "winuae" struct (in order to then access the Amiga's memory directly) from the Windows DLL - the documentation says the pointer is stored in a6, but surely that's an Amiga register, and I have no idea how to access that from Windows?

Also the documentation suggests that it is possible to access function variables in the DLL from the Amiga side, but I can't work out how to do that. What do I do with the "variable name address" once I have it?

thanks in advance for any help..
mdwh2 is offline  
Old 22 June 2003, 18:18   #6
RoKo
 
Posts: n/a
This whole DLL calling thing is a bit problematic, cause WinUAE stops while the DLL code runs.
But I can send you some .c and .h files to use it
Have to write some documentation about this...

Amithlon uses some neat tricks to execute x86 code. It can even run AmigaOS controlled without breaking the multitasking.
Basically, it treats all code that starts at an odd address (68k always starts at even addresses) as x86. There is a Linux GCC cross-compiler for this.
I don't know if somebody will implement this in UAE anytime soon.
 
Old 22 June 2003, 18:59   #7
mdwh2
Registered User
 
Join Date: Jun 2003
Location: UK
Posts: 14
Some source code would be very helpful please (my email is mark dot harman at ntlworld dot com if you want to email them).

That's interesting to know about Amithlon.. I was wondering if it had advantages over WinUAE for this.

thanks..
mdwh2 is offline  
Old 23 June 2003, 03:45   #8
andreas
Zone Friend
 
Join Date: Jun 2001
Location: Germany
Age: 50
Posts: 5,857
Send a message via ICQ to andreas Send a message via AIM to andreas
Thumbs down

Quote:
Originally posted by RoKo
Amithlon uses some neat tricks to execute x86 code. It can even run AmigaOS controlled without breaking the multitasking.
Basically, it treats all code that starts at an odd address (68k always starts at even addresses) as x86. There is a Linux GCC cross-compiler for this.
I don't know if somebody will implement this in UAE anytime soon.
NO, unfortunately this is impossible!
Amithlon is commercial, paid software, whereas UAE is under the GPL!
It wouldn't be possible to rip parts of this copyrighted code and still say, "UAE is under GPL".
andreas is offline  
Old 23 June 2003, 03:50   #9
mdwh2
Registered User
 
Join Date: Jun 2003
Location: UK
Posts: 14
Quote:
NO, this is impossible!
I'm not sure how you mean. I presumed he meant reimplementing the feature, rather than stealing from the source code directly..

And if you did want to use the source code directly, then either it would be done with permission of the author, which would be fine, or it would be without permission, which would be illegal. But either way, whether UAE is GPL or not doesn't really make a difference.
mdwh2 is offline  
Old 23 June 2003, 22:05   #10
RoKo
 
Posts: n/a
Quote:
I'm not sure how you mean. I presumed he meant reimplementing the feature, rather than stealing from the source code directly..
Right.
I do not have the Amithlon source anyway, cause it's a commercial program, you know
 
Old 12 June 2008, 09:35   #11
cosmicfrog
The 1 who ribbits
 
cosmicfrog's Avatar
 
Join Date: Apr 2006
Location: leek, Staffs, UK
Age: 56
Posts: 3,557
Send a message via MSN to cosmicfrog
ha ha found a nice old thread to bring back alive

as I run winuea on a fairly powerful pc I would like to take advantage of it from within workbench. I personlay see this as the way forward for the Amiga as emulation comes of age, (nice 1 Toni)

Until then dose someone have a list of programs that use x86 code from AmigaOS?
or anyideas as how the exploit the pc, like useing its internet connection is great but I`m sure we could use more of the hardware for our favorite OS

ponder ponder ponder ......
cosmicfrog is offline  
Old 12 June 2008, 22:31   #12
Pyromania
Moderator
 
Pyromania's Avatar
 
Join Date: Jan 2002
Location: Chicago, IL
Posts: 3,375
@RoKo

Could you put your example C source that lets this work in WinUAE in the zone please?
Pyromania is offline  
Old 12 June 2008, 23:47   #13
Graham Humphrey
Moderator
 
Graham Humphrey's Avatar
 
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 37
Posts: 11,167
Given that this guy is no longer a registered member and the post he made was almost five years ago, I would think the chances of him seeing your request are rather slim. But then again, I guess you can never quite tell
Graham Humphrey is offline  
Old 13 June 2008, 08:29   #14
StevenJGore
Amiga Fanatic
 
StevenJGore's Avatar
 
Join Date: Feb 2004
Location: North Yorkshire, UK
Age: 46
Posts: 726
I notice that Roko is also the author of QuarkTex. I wonder if he's still developing it? It's not been updated for a while.
StevenJGore is offline  
Old 14 June 2008, 03:28   #15
mdwh2
Registered User
 
Join Date: Jun 2003
Location: UK
Posts: 14
Some of us are still receiving emails from this thread

I figured out the problems I was having - I made a simple program WinLaunch (util/misc on Aminet - http://us2.aminet.net/util/misc/winlaunch.readme ), which comes with the source code if anyone is interested.

I'd also recommend looking at Bernd Roesch's TV-Watcher/Videorecorder, which comes with some source too.
mdwh2 is offline  
Old 14 June 2008, 12:58   #16
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
Personally I don't like this interface at all, it can be used for bad things too easily in my opinion..
Toni Wilen is offline  
Old 11 January 2023, 14:11   #17
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,130
Necromancery...

Is there a defined method, in 2023, for writing 68K callable host native code in WinUAE?
Karlos is offline  
Old 14 January 2023, 18:22   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
No, sorry.. I have very little interest in native code execution. Also I am not sure if pure native code is the right choice today, something more portable like C# might be better choice.

Technically some virtual autoconfig based one that I planned many many years ago (but also much later than 2008 ) still should be the best option because autoconfig board can work as a bridge which both sides can directly access (even if Amiga side uses MMU), even Amiga side interrupts are possible and it does not need Amiga side hacks.
Toni Wilen is offline  
Old 14 January 2023, 19:12   #19
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,130
Ok, let me reframe the question. How does one invoke host implemented code? I have a use case I want to explore and it would involve a UAE specific version of a library invoking a DLL or similar. For native, substitute whatever your preferred idea of portable code is, but the key point is, it's executing outside of the 68K environment.
Karlos is offline  
Old 17 January 2023, 07:21   #20
codepoet
Registered User
 
Join Date: Jan 2023
Location: Sammamish, WA, USA
Posts: 17
Quote:
Originally Posted by Toni Wilen View Post
No, sorry.. I have very little interest in native code execution. Also I am not sure if pure native code is the right choice today, something more portable like C# might be better choice.

Technically some virtual autoconfig based one that I planned many many years ago (but also much later than 2008 ) still should be the best option because autoconfig board can work as a bridge which both sides can directly access (even if Amiga side uses MMU), even Amiga side interrupts are possible and it does not need Amiga side hacks.
Toni, how does the "async" P96 functionality work? I vaguely recall the original implementation basically packing up some API params into a memory structure on Amiga side, triggering something via UAE emulation layer, and then native code side would unpack the structure locally and execute the operations using CPU code (no actual graphics acceleration at all). Did the async P96 stuff add to this and allow this whole transaction to truly happen asyncronously and then trigger an interrupt or something back to Amiga side when done, so that P96 API calls wouldn't stall the entire emulator during execution?
codepoet 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
WINUAE: swap between Native screen and RTG possible? CFou! support.WinUAE 14 12 March 2013 12:44
WinUAE 2.01 screen mode problem (native vs. RTG) StingRay support.WinUAE 13 28 January 2010 14:23
Most suitable resolutions (native) for WinUAE ancalimon support.WinUAE 2 06 November 2009 21:13
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 03:20.

Top

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