 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Shazz

Joined: 31 Aug 2004 Posts: 244 Location: Somewhere over the rainbow
|
Posted: Sun Oct 23, 2005 1:58 am Post subject: DMAC stub |
|
|
Can somebody tell me what's wrong with this stub ?
| Quote: | STUB_START "sceDmac",0x40010000,0x00010005
STUB_FUNC 0x617f3fe6,sceDmacMemcpy
STUB_END |
is the linkage module flag 0x40010000 wrong ?
Calling sceDmacMemcpy, causes a bus error in my app... :( _________________ - TiTAN Art Division -
http://www.titandemo.org |
|
| Back to top |
|
 |
groepaz

Joined: 01 Sep 2005 Posts: 305
|
|
| Back to top |
|
 |
Arjan
Joined: 24 Apr 2005 Posts: 12 Location: Netherlands
|
Posted: Sun Oct 23, 2005 6:00 am Post subject: |
|
|
I used this stub:
STUB_START "sceDmac",0x40010000,0x00020005
STUB_FUNC 0x617f3fe6,sceDmacMemcpy
STUB_FUNC 0xd97f94d8,sceDmacTryMemcpy
STUB_END
int sceDmacMemcpy(void *dest, const void *source, unsigned int size);
int sceDmacTryMemcpy(void *dest, const void *source, unsigned int size);
I used sceDmacMemcpy only once in an experiment to see if it would speed up transferring data from ram to vram (or vram to vram, don't have the sourcecode of those tests anymore). Transferring an array of 512 bytes worked fine for me, an array of 272*228*2 (124032) bytes worked too.
If the source data was placed in ram, I've either been lucky with the memory alignment, or it could be alignment didn't matter.
If I did place te source data placed in vram after all, the start address would've been 0x44100000.
Destination address in all cases was at pixel 0 of a display line in vram (with 15bit color mode).
I was probably just lucky my parameters met the alignment requirements, but at least you should be able to create something that works now. After that you can try breaking it to find out how many bytes alignment is needed (my guess would be 2 or 4 bytes). |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|