memmove issue

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
yoyofr
Posts: 23
Joined: Sat Jun 25, 2005 7:08 pm
Location: paris
Contact:

memmove issue

Post by yoyofr »

hi, just wanted to point the small issue with pspsdk & memmove.
it doesn't seem to be well implemented whereas memcpy is ok.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

What's the issue?
yoyofr
Posts: 23
Joined: Sat Jun 25, 2005 7:08 pm
Location: paris
Contact:

Post by yoyofr »

in fact it's a bit strange. I had my sources compiling and working well without pspsdk (using my own malloc, stdio functions, ...).
the sources are snes9x ones, more specifically, my own version of it (I'm the author of ljp, a palmos multi system emulators).
I've ported it to pspsdk, compiling is fine, ... but when I launch the program, I had a blackscreen with a very low fps. but *no crash*.
basically, instead of having the game showing, I had a black screen and it was like the I was emulating a lot of cpu intensive instructions

so I guess the memmove had corrupted some memory areas, but nothing too nasty since I had no crash and always could exit using home button.

by using a #define memmove memcpy in a globally used include file,
the issue ran away. I don't remember the sdk version I'm using, but I've
done a checkout on svn last monday evening (GMT+1)

anyway, I'll publish the sourcecode soon on my website

*edit*
I forgot to thank you for all your work! I don't post a lot in the forum but I read it everyday and it's mainly thanks to it that neocdpsp could be done.
I hope you keep up the great work!
User avatar
mc
Posts: 211
Joined: Wed Jan 12, 2005 7:32 am
Location: Linköping

Post by mc »

I had a quick look at the implementation, and it seems to me that

*udst-- = *usrc--;

should really be

*--udst = *--usrc;
Flying at a high speed
Having the courage
Getting over crisis
I rescue the people
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Indeed it should be, changed it.
Post Reply