
Amiga International is committed to move towards a PowerPC Amiga
fairly rapidly. This means that the OS will change in many
respects on the PowerPC side of things. We don't want to move just
towards "OS 3.1 on a PowerPC", we want a better and modern OS.
Quite a few changes will happen not only to exec.library but also
to other subsystems. Many things are so low level that you have to
be careful about them. This means that struct ExecBase and low
level HW stuff should be considered a black box as far as humanly
possible. We will add restrictions and declare previously used
practices that stop us from moving forward illegal for PPC code.
For previously legal things that cannot be supported any longer, we
will have new replacement functionality.

Specific restrictions and hints:

    - Do not use SysBase->ThisTask. DON'T! Use FindTask(NULL)
      instead. On a PowerPC Amiga, you might regret using ThisTask.
      While the OS 3.1 includes say "readable", as of January 1st,
      1996, ThisTask is a private field.

    - Cache SysBase! Do not access $4 all the time if you can cache
      that value! This will improve performance a lot!

    - Stay away from Disable() and Forbid(). STAY AWAY FROM THEM!
      The semantics of Forbid() may be restricted to certain
      allowed uses. Use semaphores to protect shared data.
      Use of Forbid() "to speed up things" only demonstrates
      incompetence.

    - Use semaphores to synchronize data accesses. Do not rely on
      "atomic" CPU instructions, task priorities or Forbid().
      Use signals and message replies for communication
      by interrupt code. Don't depend on current behaviour of the
      scheduler.

    - Don't try to fiddle with the Lists in ExecBase. They might
      disappear. A new OS will provide access functions for really
      important stuff. See the warning about Forbid().

    - Stay away from low level functions like trap or exception
      handling functions.

    - Stay away especially from these functions:

        exec.library/AllocAbs
        exec.library/AllocTrap
        exec.library/Disable
        exec.library/Enable
        exec.library/Forbid
        exec.library/FreeTrap
        exec.library/GetCC
        exec.library/ObtainQuickVector
        exec.library/OldOpenLibrary
        exec.library/Permit
        exec.library/SetExcept
        exec.library/SetFunction
        exec.library/SetIntVector
        exec.library/SetSR
        exec.library/SetTaskPri
        exec.library/SuperState
        exec.library/Supervisor
        exec.library/UserState

      They may change, become completely or partly obsolete and
      unusable. This does not mean that you don't have to be
      careful about use of any other functions. If you feel that
      something might be a hack, better don't do it!

    - Note not only for SetTaskPri(): It is not legal to modify
      tasks that you do not handle and own.

    - OldOpenLibrary() will finally end in an Alert(). Yeah!

    - Expect interrupt handling to change in many ways. If you can,
      don't do interrupt stuff. Stay at the task/process level.

    - You could theoretically still access these fields

        AttnFlags   (which will be pretty useless on a PowerPC and
                     replaced with a query function)

        VBlankFrequency (which has always been a tricky value)

        PowerSupplyFrequence    (which is no longer accurate even
                                 on current hardware)

      if they were still there in a future OS, but obviously we
      will set up access function for the necessary things.

    - If there is an OS function to do things or access structures,
      use it. If there isn't, you should take this as indicator
      that you should not do those things at the moment.

    - The HW that you know will disappear, too. No more hacking
      into OCS/ECS/AGA registers. Use graphics.library. No more
      hacking into CIA's. Use timer.device, parallel.device,
      serial.device.

    - If you can feel that something might be of questionable
      value, stability, or portability even before you did it, then
      don't do it.

    - The OS can not and could not be shut down and revived again.
      Don't even try it. You will die, lose all the functionality
      and experience all the nasty things hidden by the OS.

    - Banging the HW usually only shows incompetence.

Realize what this means? On a PowerPC Amiga, ExecBase and a lot
more in the OS as you know it will disappear and change. Just like
IntuitionBase did in 1991. To quote a really good comment:

    /* I told you this was private.
     * The data beyond this point has changed, is changing, and
     * will continue to change.
     */

Heinz Wrobel
<heinz@amiga.de>


