When you have a code that only works only for a specific map/level(DMA) and when you try to un-DMA it with DMA Hunter and dosent work do this.
1.) add 08800000 to your address
2.) then go to searcher then put your sum in exact search if there is no result subtract 00000004.
*subtract 00000004 no result then undo search then subtract 00000004 again keep doing this.
3.) keep doing this until you get your result
4.) when you get your result copy the address to decoder the result will be your pointer
5.) now get the value of your pointer and subtract it from your original DMA code
6.) after you have your pointer and offset you will need to make a subroutine here is the template:
j $HOOK
lui t0 $first half of your code value
addiu t0 t0 $seconed half of your code value
lui t1 $first half of pointer(+0880)
lw t1 $seconed half of pointer(t1)
sw t0 $offset(t1)
jr ra
If this does not work you have another level do this:
1.) Search in exact value the result of the subtraction (adress of your actual code - offset)
2.) the result is the 1st pointer write down the value and address
3.) Reset search
4.) ok now search the value of the first pointer in exact value search
5.) if there is no result keep subtracting 00000004 until you get a result
*subtract 00000004 no result then undo search then subtract 00000004 again keep doing this.
6.)the result will be the seconed pointer
7.) subtract the 2nd pointer value from the first pointer's address
8.) the result would be the 2nd offset in your unDMA code
9.) now make your subroutine like this:
j $HOOK
lui t0 $value you want your code to have
addiu t0 t0 $seconed half you want your code to have
lui t1 $first half of your second pointer(+0880)
lw t1 $2nd half of your second pointer(t1)
lw t2 $1st offset you got(t1)
sw t0 $2nd offset you got(t2)
jr ra
If this still dosent work after your seconed pointer thir is another level to your DMA code you will have to do the seconed way but with your seconed pointer and offset
the subroutine will look like this:
j $HOOK
lui t0 $value you want your code to have
addiu t0 t0 $seconed half you want your code to have
lui t1 $first half of your thrid pointer(+0880)
lw t1 $2nd half of your thrid pointer(t1)
lw t2 $1st offset you got(t1)
lw t3 $2nd offset(t2)
sw t0 $3rd offset you got(t3)
jr ra
1.) add 08800000 to your address
2.) then go to searcher then put your sum in exact search if there is no result subtract 00000004.
*subtract 00000004 no result then undo search then subtract 00000004 again keep doing this.
3.) keep doing this until you get your result
4.) when you get your result copy the address to decoder the result will be your pointer
5.) now get the value of your pointer and subtract it from your original DMA code
6.) after you have your pointer and offset you will need to make a subroutine here is the template:
j $HOOK
lui t0 $first half of your code value
addiu t0 t0 $seconed half of your code value
lui t1 $first half of pointer(+0880)
lw t1 $seconed half of pointer(t1)
sw t0 $offset(t1)
jr ra
If this does not work you have another level do this:
1.) Search in exact value the result of the subtraction (adress of your actual code - offset)
2.) the result is the 1st pointer write down the value and address
3.) Reset search
4.) ok now search the value of the first pointer in exact value search
5.) if there is no result keep subtracting 00000004 until you get a result
*subtract 00000004 no result then undo search then subtract 00000004 again keep doing this.
6.)the result will be the seconed pointer
7.) subtract the 2nd pointer value from the first pointer's address
8.) the result would be the 2nd offset in your unDMA code
9.) now make your subroutine like this:
j $HOOK
lui t0 $value you want your code to have
addiu t0 t0 $seconed half you want your code to have
lui t1 $first half of your second pointer(+0880)
lw t1 $2nd half of your second pointer(t1)
lw t2 $1st offset you got(t1)
sw t0 $2nd offset you got(t2)
jr ra
If this still dosent work after your seconed pointer thir is another level to your DMA code you will have to do the seconed way but with your seconed pointer and offset
the subroutine will look like this:
j $HOOK
lui t0 $value you want your code to have
addiu t0 t0 $seconed half you want your code to have
lui t1 $first half of your thrid pointer(+0880)
lw t1 $2nd half of your thrid pointer(t1)
lw t2 $1st offset you got(t1)
lw t3 $2nd offset(t2)
sw t0 $3rd offset you got(t3)
jr ra
- Code:
Defeating Multi-Level DMA
Created by: FoodFx