Searching RAM (in VSH mode)

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

Moderators: cheriff, TyRaNiD

Post Reply
kralyk
Posts: 114
Joined: Sun Apr 06, 2008 8:18 pm
Location: Czech Republic, central EU

Searching RAM (in VSH mode)

Post by kralyk »

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...
kralyk
Posts: 114
Joined: Sun Apr 06, 2008 8:18 pm
Location: Czech Republic, central EU

Post by kralyk »

never mind, figured out myself...
...sorry for my english...
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

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.
kralyk
Posts: 114
Joined: Sun Apr 06, 2008 8:18 pm
Location: Czech Republic, central EU

Post by kralyk »

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...
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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: Select all

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.
Post Reply