forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Searching RAM (in VSH mode)

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
kralyk



Joined: 06 Apr 2008
Posts: 114
Location: Czech Republic, central EU

PostPosted: Tue Nov 25, 2008 6:37 am    Post subject: Searching RAM (in VSH mode) Reply with quote

Hi!

Id like to perform something similar to what CWCheat does, but in VSH mode...

How do I do that?
Do I simply make a pointer and increase it?

Very basic search, no DMA or anything - I just want to search for a certain value in RAM in areas where photo or video vsh modules are...
_________________
...sorry for my english...
Back to top
View user's profile Send private message
kralyk



Joined: 06 Apr 2008
Posts: 114
Location: Czech Republic, central EU

PostPosted: Tue Nov 25, 2008 9:52 am    Post subject: Reply with quote

never mind, figured out myself...
_________________
...sorry for my english...
Back to top
View user's profile Send private message
Art



Joined: 09 Nov 2005
Posts: 647

PostPosted: Tue Nov 25, 2008 8:51 pm    Post subject: Reply with quote

I assume that was the answer...
to define an array, and then search with an index that extends beyond it's boundaries?
It appears to work in my programs.
_________________
If not actually, then potentially.
Back to top
View user's profile Send private message
kralyk



Joined: 06 Apr 2008
Posts: 114
Location: Czech Republic, central EU

PostPosted: Tue Nov 25, 2008 9:57 pm    Post subject: Reply with quote

Or you can just define a pointer at starting position and increase it while searching... array works the same, indeed...

In my code I actually dump whole block of ram to ms... The code
can be found in psplinkusb in file shell.c and decodemem.c
_________________
...sorry for my english...
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Tue Nov 25, 2008 11:29 pm    Post subject: Reply with quote

You just need to declare a pointer to the user memory.
If you declare u32 pointer you can access each 4 bytes like an int.
If you declare a unsigned char you can access it one byte at a time.
Or you can just declare pointers for all data types. Its going to consume like a couple of bytes only :P and use each one where appropriate.

Code:
unsigned char * umem = 0x8800000;
#define UBOUND 24*1024*1024;
umem[0] = byte1;
umem[1] = byte2;
...
umem[UBOUND] = byteat24MB;


On the Slim the UBOUND for user memory will be different in VSH mode.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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