unsigned int blah;
int res = sceIoLseek(fd, 0x123, 0);
[b]printf("sceIoLseek: %d\n", res);[/b]
sceIoRead(fd, (char*)&blah, 4);
output: sceIoLseek: -7ffdfcdc
read works ok but it always reads the first 4 bytes.
Looks like "res" really should be unsigned. Mind changing that so it might be possible to make more sense of the return code ?
I don't know a heck of alot about reading to/from flash. But I wonder if its possible that reads/writes should be in some multiples of a block size ?
For efficiency, you might also consider reading a 512 byte chunk at a time first into a buffer, then do you program reading/seeking from that buffer. Reading one character at a time from memstick could be expensive.
Maybe I am making an assumption here that the IoRead call itself is unbuffered, and that assumption may be incorrect. Anyone know ?