
Originally Posted by
TiGeR.Jatt...
ya i get what it means...but the thing i dont get is this
Code:
Figure 2:
To Get The Offset:
Lets say my pointer points to 0x01300004 and your code you want to DMA is 0x01300068
1: Get out the calculator. Start>Run>Calc
2: View>Scientific
3: Put Dec. to Hex
4: Subtract the two addresses subtract the smaller number from the bigger
VVVVVVVVVVVVVVVVVVV
1300068 - 1300004
^^^^^^^^^^^^^^^^
5: Bam! you got your offset which is 0x00000064
the pointer is pointing 2 0x01300004 ..
and the code i want 2 dma is 0x01300068
How would i find this
If I'm not mistaken...
1.) Open ps2dis.exe
2.) Load your dump
3.) Click Analyzer --> Invoke Analyzer
4.) Go to Analyzer --> Jump to previous referrer (Shift + F3, I think). It could be Jump to next referrer (F3, I think), I'm not sure although I think it's the one before.
5) The opcode of the address you jumped to should be a j, jr, or jal I believe. That address should be your pointer. I'm not sure if you leave it in real addressing, I think you do. Ask Iv or BK to clarify that for you.
I think this is how you would do it, I"m not 100% sure, so please don't take this for fact and bitch cause it doesn't work.
BK: He was asking how do you find the pointer. I'll relate it to C++ for you... &pointer and *pointer.
Whoever needs info on pointers: The reference operator (&) translates to 'address of' so let's say (in C++, you need to learn 3rd gen before you can even remotely know 2nd or assembly)
Would translate to variable one equals the address of variable two meaning variable two equals where ever variable one is located. We can relate location to address and what variable two equals as the hex.
In C++ we can relate
Code:
int address1 = 43442336;
to
Code:
0xaddress1 0x43442336
in MIPs.
Now for some on the dereference operator (*)... the dereference operator (*) roughly translates to 'value pointed by'
translates to variable one equals the value pointed by variable two. This is the same as saying variable two equals variable one. This is passing the value of variable one to variable two. This bypasses the need for worrying about the address of the variable.
In C++ we can relate
Code:
int *address2 = deadbeef;
to
Code:
0xaddress2 0xdeadbeef;
0xaddress3 = *address2; not really, this is for the idea, I'm not good with MIPs
Hitting the Thanks and Rep+ button never hurt anyone. ;)
Bookmarks