| View previous topic :: View next topic |
| Author |
Message |
kralyk
Joined: 06 Apr 2008 Posts: 114 Location: Czech Republic, central EU
|
Posted: Tue Nov 25, 2008 6:37 am Post subject: Searching RAM (in VSH mode) |
|
|
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 |
|
 |
kralyk
Joined: 06 Apr 2008 Posts: 114 Location: Czech Republic, central EU
|
Posted: Tue Nov 25, 2008 9:52 am Post subject: |
|
|
never mind, figured out myself... _________________ ...sorry for my english... |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Tue Nov 25, 2008 8:51 pm Post subject: |
|
|
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 |
|
 |
kralyk
Joined: 06 Apr 2008 Posts: 114 Location: Czech Republic, central EU
|
Posted: Tue Nov 25, 2008 9:57 pm Post subject: |
|
|
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 |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Tue Nov 25, 2008 11:29 pm Post subject: |
|
|
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 |
|
 |
|