I am trying to copy some data from ee ram to iop ram and back again using an iop program. I saw the sifman header file in the ps2sdk, but I got a bit confused because there are 3 different sifDma's(0-2). I looked around in the ps2sdk, but I couldn't find anything that was for the iop.
Or is there a faster/better way to do 2 way transfers from the iop then dma that I am overlooking?
Thanks.
IOP Dma example?
I think the siftoo IOP module by Marcus R. Brown in the ps2sdk is what you are looking for:
http://svn.ps2dev.org/filedetails.php?r ... rev=0&sc=0
I think it should be used with the sbusintr module.
You might also want to check out the ps2link source, it does EE-IOP communication using SIF DMA, since it's from the days when RPC was unstable :-)
http://svn.ps2dev.org/filedetails.php?r ... rev=0&sc=0
I think it should be used with the sbusintr module.
You might also want to check out the ps2link source, it does EE-IOP communication using SIF DMA, since it's from the days when RPC was unstable :-)
-
- Posts: 83
- Joined: Wed Jul 13, 2005 12:25 am
-
- Posts: 83
- Joined: Wed Jul 13, 2005 12:25 am
Hey,
When you're at iop side you have to suspend interupt before performing dma transfert and resume it after.
Like that:
While at ee side you don't have to use interupts.
Other way to access iop ram from ee is to use sbv code ( smem.c ) which use memory mapping to access iop ram in kernel mode.
From my own experience, it's largely faster to read/write iop ram with memcpy in kernel mode then using dma transfert.
But i don't know if ps2sdk give a way make same ting from iop to ee ram.
Best regards
Polo
When you're at iop side you have to suspend interupt before performing dma transfert and resume it after.
Like that:
Code: Select all
while(SifDmaStat(dma_id) >= 0);
sifdma.src = src;
sifdma.dest = dest;
sifdma.size = size;
sifdma.attr = 0;
CpuSuspendIntr(&intr);
dma_id = SifSetDma(&sifdma, 1);
CpuResumeIntr(intr);
Other way to access iop ram from ee is to use sbv code ( smem.c ) which use memory mapping to access iop ram in kernel mode.
From my own experience, it's largely faster to read/write iop ram with memcpy in kernel mode then using dma transfert.
But i don't know if ps2sdk give a way make same ting from iop to ee ram.
Best regards
Polo