Hi,
I'm sorry to create a thread just for this but everyone can ask some requestion to expert.
Hope the knowldge may be share.
In order to patch a game I need to use the MOVA function In the SH-4 document I find this :
I need to use exactly :
0x8C033090 -> mova 0x8C03309C, r0
If I understand well the value in 0x8C03309C will be inject in r0.
My problem is how can I calculate the "i"...
For me I have to do :
(0x8C033090 + 4 ) - 0x8C03309C = -8 #(PC +4 - relative)
8 -> 0000 1000 #On 8 bits length
-8 -> 1111 1000
remove the 2 lowest bits :
1111 10
"and adding the zero-extended 8-bit immediate i multiplied by 4"
So here I don't understand...
Please don't do it for me, But may you can explain to a noob ^^
Many thanks
I'm sorry to create a thread just for this but everyone can ask some requestion to expert.
Hope the knowldge may be share.
In order to patch a game I need to use the MOVA function In the SH-4 document I find this :
I need to use exactly :
0x8C033090 -> mova 0x8C03309C, r0
If I understand well the value in 0x8C03309C will be inject in r0.
My problem is how can I calculate the "i"...
For me I have to do :
(0x8C033090 + 4 ) - 0x8C03309C = -8 #(PC +4 - relative)
8 -> 0000 1000 #On 8 bits length
-8 -> 1111 1000
remove the 2 lowest bits :
1111 10
"and adding the zero-extended 8-bit immediate i multiplied by 4"
So here I don't understand...
Please don't do it for me, But may you can explain to a noob ^^
Many thanks

![[IMG]](https://web.archive.org/web/2im_/https://image.noelshack.com/fichiers/2019/24/2/1560237798-first-one.png)