C (72/207)

From:Martyn Capewell
Date:09 Dec 99 at 20:13:40
Subject:Amigaamp plugins

From: Martyn Capewell <mmc28@hermes.cam.ac.uk>

Hello,

I've recently been writing some AmigaAmp plugins, but I have problems with
them if I compile for PowerUP. 68k versions are fine. After a while, the
plugin will just lock up, shortly followed by AmigaAmp itself locking up.
I'm using VBCC, btw.

For those unfamiliar with the mechanism AmigaAmp uses for plugins:

1. PluginMsg structure is allocated, which contains pointers to the data
I require.
2. A signal is allocated for AmigaAmp to alert plugin when new msg is
available.
3. Signal received.
4. Message is received and the data it points to is manipulated by the
PPC. The data is read, processed, and written into memory allocated
by the plugin.
5. Processed data displayed on screen using guigfx.library.
6. Goto 3.

The PluginMsg structure has been allocated with PPCAllocVec(), and the
processed data memory is allocated with PPCAllocMem(). I'm not sure how
AmigaAmp allocates it's memory for the plugin to examine.

Does anybody have any idea what the problem is? Could it be a 68k/PPC
cache/memory synchronisation problem, caused by AmigaAmp allocating the data
memory with Alloc*(), rather than PPCAlloc*()?

Maybe there's not enough detail here, but hopefully someone may have a clue
as to what I'm doing wrong. A copy of the source is available if anybody
wants a peek. Just email me.

Thanks in advance.



- Martyn Capewell
{ Compsci, University of Cambridge }
{ http://members.xoom.com/legerdemain0 }