Welcome, Guest. Please login or register.

Author Topic: Best version of 68040.library to use with WinUAE.  (Read 3073 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline whabangTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 7270
    • Show only replies by whabang
Best version of 68040.library to use with WinUAE.
« on: October 09, 2003, 09:08:08 AM »
Has anyone got any suggestions? :-?
Beating the dead horse since 2002.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Best version of 68040.library to use with WinUAE.
« Reply #1 on: October 09, 2003, 09:29:07 AM »
None.
 

Offline whabangTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 7270
    • Show only replies by whabang
Re: Best version of 68040.library to use with WinUAE.
« Reply #2 on: October 09, 2003, 09:37:04 AM »
Bummer! :-(
Beating the dead horse since 2002.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Best version of 68040.library to use with WinUAE.
« Reply #3 on: October 09, 2003, 09:54:19 AM »
It was a reply to the subject.

You don't need 68040.library with WinUAE. WinUAE 040 emulation doesn't emulate MMU at all, and afaik proper cachemode setup is done by UAE itself (gfxcard framebuffer, custom, cia are noncacheable and so on...).

PS. There is a experimental MMU patch for UAE, but it slows emulation down quite abit, and is less stable (I've heard). With this version you could use 68040.library, I suppose. No idea which one.
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: Best version of 68040.library to use with WinUAE.
« Reply #4 on: October 09, 2003, 10:17:30 AM »
Why not just use 020 emulation, since it'll run more or less the same speed as 040 emulation, and support more instructions? :-?
Playstation Network ID: xeron6
 

Offline whabangTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 7270
    • Show only replies by whabang
Re: Best version of 68040.library to use with WinUAE.
« Reply #5 on: October 09, 2003, 10:35:21 AM »
Quote

xeron wrote:
Why not just use 020 emulation, since it'll run more or less the same speed as 040 emulation, and support more instructions? :-?

040 optimized apps run faster... (just a little)
Beating the dead horse since 2002.
 

Offline Thomas

Re: Best version of 68040.library to use with WinUAE.
« Reply #6 on: October 09, 2003, 12:20:50 PM »
Quote
040 optimized apps run faster... (just a little)


Not at all. In fact 040 emulation is slower than 020 emulation. The more complex the emulated machine is, the slower is the emulation. The speed gain of a 040 about a 020 mainly is the cache. And in WinUAE cache is adjusted by the JIT slider, not by the processor type. Another improvement is the FPU, but AFAIK the builtin FPU of any processor has less commands than the external FPU of the 68020+FPU setting. (As mentioned above, FPU emulation might slow down emulation compared to a processor without FPU).

You need 040 emulation only if your program does not work on a 020. Most programs do.

The same is true for 040 <-> 060 issue. This is the reason why there is no 060 emulation: every 060 program will work on a 040, too. The only differences are in hardware that is not really emulated (caches, pipelines, number of integer units etc.). On emulation there would be no difference in speed.

Bye,
Thomas

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: Best version of 68040.library to use with WinUAE.
« Reply #7 on: October 09, 2003, 12:32:08 PM »
Quote

whabang wrote:
040 optimized apps run faster... (just a little)


Errmm.. under emulation? It shouldn't make any difference.
Playstation Network ID: xeron6
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Best version of 68040.library to use with WinUAE.
« Reply #8 on: October 09, 2003, 03:09:38 PM »
Quote

Thomas wrote:

Not at all. In fact 040 emulation is slower than 020 emulation. The more complex the emulated machine is, the slower is the emulation. The speed gain of a 040 about a 020 mainly is the cache. And in WinUAE cache is adjusted by the JIT slider, not by the processor type. Another improvement is the FPU, but AFAIK the builtin FPU of any processor has less commands than the external FPU of the 68020+FPU setting. (As mentioned above, FPU emulation might slow down emulation compared to a processor without FPU).


Whilst I don't pretend to understand why, this isn't my experience at all. 68040 optimised code runs about 5% faster on my installation of UAE running in 040 mode than the 020/882 optimised version of the same code in 020+68882 emulation mode.

Perhaps it could be that the 040 has fewer user-mode instructions to support than the 020/6882 model but I'm only guessing.
int p; // A
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: Best version of 68040.library to use with WinUAE.
« Reply #9 on: October 09, 2003, 03:19:47 PM »
Quote

Karlos wrote:
Whilst I don't pretend to understand why, this isn't my experience at all. 68040 optimised code runs about 5% faster on my installation of UAE running in 040 mode than the 020/882 optimised version of the same code in 020+68882 emulation mode.


Run the 040 code on the 020/882 emulation mode and see if it makes any difference.
Playstation Network ID: xeron6
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Best version of 68040.library to use with WinUAE.
« Reply #10 on: October 09, 2003, 03:23:22 PM »
Quote

xeron wrote:
Quote

Karlos wrote:
Whilst I don't pretend to understand why, this isn't my experience at all. 68040 optimised code runs about 5% faster on my installation of UAE running in 040 mode than the 020/882 optimised version of the same code in 020+68882 emulation mode.


Run the 040 code on the 020/882 emulation mode and see if it makes any difference.


Well, I forgot to say - the 040 optimised code running in 020/882 mode runs at no noticable speed difference to the 020/882 code in 020/882 mode.

Basically all I am saying is that on my (old and a bit slow PC) system, 040 optimised code running in 040 emulation mode is measurably faster (sometimes upto 10%) than any other combo I've tried...
int p; // A
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: Best version of 68040.library to use with WinUAE.
« Reply #11 on: October 09, 2003, 03:30:39 PM »
Quote

Karlos wrote:
Basically all I am saying is that on my (old and a bit slow PC) system, 040 optimised code running in 040 emulation mode is measurably faster (sometimes upto 10%) than any other combo I've tried...


How very odd. I personally havent seen the UAE sources, but I can't imagine they're using a different emulation core if you select 040 instead of 020.

I don't know why they don't just emulate a generic "680x0" processor that supports all instructions and addressing modes of the whole range.
Playstation Network ID: xeron6
 

Offline KennyR

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 8081
    • Show only replies by KennyR
    • http://wrongpla.net
Re: Best version of 68040.library to use with WinUAE.
« Reply #12 on: October 09, 2003, 03:58:28 PM »
040 optimised code is only faster on a real 040, because it uses tricks that the 040 hardware can do better than other CPUs. It's not faster under emulation, trust me. I notice no difference between 020/040/060 optimised code on the fastest 68k emulation currently available - MorphOS Trance.

In fact, UAE's 040 emulation can be a wee bit buggy too, another reason to stick to 020 code.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Best version of 68040.library to use with WinUAE.
« Reply #13 on: October 09, 2003, 04:17:35 PM »
@Kenny,

I guess the phrase we are looking for is 'Your Mileage May Vary'...

MOS speed advantage is not just down to its 68K emulation - the fact that the OS calls (usually the most time consuming) are PPC native helps just as much. No doubt register allocation is a trivial operation on PPC too ;-)

Anyway, back to WinUAE. I've written code and tested under pretty strict conditions. On my PC at least, 040 optimised code running in 040 emulation mode (all other UAE settings unchanged) is faster than than 020/882 code in 040 emulation mode. This is unusual, unless the 040 emulation is written differently in some way.

The 040 optimised code running in 020/882 mode is no different from 020/882 optimised code in 020/882 mode.

Naturally any small set of tests are subject to random fluctuations, but the differences I've noticed on my PC are totally systematic over many repetitions.
int p; // A
 

Offline KennyR

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 8081
    • Show only replies by KennyR
    • http://wrongpla.net
Re: Best version of 68040.library to use with WinUAE.
« Reply #14 on: October 09, 2003, 04:21:15 PM »
Quote
Karlos wrote:
MOS speed advantage is not just down to its 68K emulation - the fact that the OS calls (usually the most time consuming) are PPC native helps just as much. No doubt register allocation is a trivial operation on PPC too ;-)


I meant more the fact that Trance is Hotspot JIT, the fastest variant available.

Quote
On my PC at least, 040 optimised code running in 040 emulation mode (all other UAE settings unchanged) is faster than than 020/882 code in 040 emulation mode. This is unusual, unless the 040 emulation is written differently in some way.


I suppose then it depends on the PC's CPU and memory bandwidth. If you say that 040 code is faster on WinUAE for you I believe you, but there's no logical reason why it should be faster (at least that I can think of).