Welcome, Guest. Please login or register.

Author Topic: How does the PowerUP-accelerators actually work?  (Read 3100 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 all replies
    • http://www.troubled-mind.com
Re: How does the PowerUP-accelerators actually work?
« on: November 16, 2003, 05:19:04 PM »
Quote
a1200 u have contextswitching between the 3 cpus


Lempkee, what the hell are you talking about???


Anyway, The 68K boots the machine running AmigaOS from the ROM, the PPC processor also boots but it boots a custom OS (PowerUP forexample) from it's own ROM (on the PPC board). The PPC's OS is little more than an executive (like AmigaOS's exec.library), and it just sits there until the 68k gives it a task.

The PPC is then able to load the task an execute it. The 68K and the PPC run at the same time (but share their Memory), and the 68K and the PPC have to communicate using special structures defined by the system you are using.
The PPC is not allowed to access any AmigaOS structures but instead must ask the 68K to do OS things for it. I believe the PPC is allowed to access the Amiga Custom Chips.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12114
    • Show all replies
    • http://www.troubled-mind.com
Re: How does the PowerUP-accelerators actually work?
« Reply #1 on: 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?).