Welcome, Guest. Please login or register.

Author Topic: PPC/68060 Faster or not?  (Read 4414 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show all replies
Re: PPC/68060 Faster or not?
« on: August 03, 2003, 04:50:56 AM »
@Jose

Programming efficient code for existing 680x0+PPC cards is quite interesting :-)

You can do a lot of os calls if you are careful - Design the code such that OS calls can be gathered together, create a 680x0 function that handles these OS calls and do a manual context switch to that function.

As an example I wrote a small test context in C that maintains a double buffered screen and handles input. I wrote it in vbcc-wos/68k to test the idea of manual switches on performance.

When I refresh, a 68K function is called. This function does the buffer flip and gathers and processes all the pending idcmp messages since the last frame (well up to a certian amount) into a pair of mouse / key data buffers. This included stuff like KeyMap based raw key mapping. So there were quite a few OS calls there.

The code then switches back to PPC and the input buffers are processed by PPC callback functions before the refresh() function finally returns.

So for the price of 2 complete context switches (PPC->68K->PPC) we get our buffer flipped, synchronised and the input ready to use by the PPC.

Hmm, I have wandered off topic again, havent I? Sorry, must be the late hour :-)
It worked quite well :-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show all replies
Re: PPC/68060 Faster or not?
« Reply #1 on: August 03, 2003, 01:37:10 PM »
Quote

olegil wrote:
Why is there an infinite loop in your signature? ;-)

Infinite, eh? Take a closer look at the loop condition ;-)
Quote

Of course, the new CRAY can run that in less than 4 seconds, but still  :-D


Then it can't be infinite, can it? As for the time, I's say it ought to vary considerably....:-D
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show all replies
Re: PPC/68060 Faster or not?
« Reply #2 on: August 03, 2003, 01:44:12 PM »
Back on topic, it seems ironic to me that the 060 handles the context swich so much better.

Ok, it has typically twice the clockspeed but also has twice the amount of data to push when it flushes its cache.

In any event, context switching is the biggest hold up on any of the cards. It will be interesting to see how OS4's 68K emulation affects existing WarpOS applications (assuming it is supported) running on these dual processor cards, once the real 68k becomes redundant and context swiching dissapears...and of course the majority of OS (hopefully all) calls will ppc native too :-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show all replies
Re: PPC/68060 Faster or not?
« Reply #3 on: August 04, 2003, 08:14:44 PM »
int p; // A