Welcome, Guest. Please login or register.

Author Topic: How does the PowerUP-accelerators actually work?  (Read 3094 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: How does the PowerUP-accelerators actually work?
« Reply #14 from previous page: November 16, 2003, 10:56:32 PM »
Quote

Karlos wrote:
Quote

bloodline wrote:
The PPC is not allowed to access any AmigaOS structures but instead must ask the 68K to do OS things for it.


Not entirely true. The PPC read access amiga OS data structures fine as long as the basic alignment is limited to 2 byte boundaries. Thats why you have #pragma amiga-align in vbcc ;-)

Writing to OS data structures is fine too, provided they are allocated cache aligned, hence the AlocVec32() functions.

However, just as with 680x0 code, you *should* use the OS functions for dealing with OS structures where possible.

For writing 'good' code under warpos, the best thing is to gather all of your 680x0 OS routines that are called as part of an operation (updating the display, fetching input events from your window etc., waiting for the display sync) into a single 68K function that you can then manually context switch to from the PPC.

I used this approach in some experimental code in vbcc to test the idea and got a double/triple bufffered display with IDCMP input (the event data was copied to a shared area so the handler callbacks can be ppc native) down to one full PPC->68K->PPC context switch per frame.

Still, I am looking forward to forgetting all of these type tricks when OS4 is released :lol:


I must confess that I never used WarpOS, I simply couldn't be bothered with it :-)

I did write a PPC (PowerUP) multithread library for BlitzzBasic though, that alowed you to to complex processing on the PPC Async with your 68k program.. (did anybody ever use it?).

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show only replies by Karlos
Re: How does the PowerUP-accelerators actually work?
« Reply #15 on: November 17, 2003, 02:39:10 AM »
@lempkee

I have to admit, you have me foxed with the 'switching between 3 cpus' thing also. The motherboard 68020 in the a1200 is totally offline by the time the BlizzPPC's 68040/60 is up and running.
int p; // A