Site Announcements

All Passwords have been lost in upgrade. Please recover using forgot password form.

Patch Porting doubts and discussion

Understanding VKP Patches and basic porting

Patch Porting doubts and discussion

Postby Edgpaez on 28 Jan 2009 19:06

Good day Developers :kool:

In this thread you can post any doubt or problem you have about this tutorials:

[Tutorial] Advanced patch porting
[Tutorial] Making ASM File.
[Tutorial] Porting and Compiling ASM files
Porting Lib Funcitions

Or any general problem or issue you might get you when you try to port advanced or simple patches.
Remember no porting or creating request are allowed.

Feel free to learn and ask for help, you'll get quick help on your port, no need to send PM to developers.... :grin:

Regards
Last edited by Shadow Player on 22 Dec 2009 19:36, edited 1 time in total.

For this message the author Edgpaez has received thanks - 2:
vahidgood, vodoo999
User avatar
Edgpaez
Team Leader


Posts: 613
Joined: 09 Oct 2008 00:42
Thanks Given: 888 times
Thanks Recieved: 732 times

RE: Patch Porting doubts and discussion

Postby lolittle on 29 Jan 2009 01:46

I have used the tutorial and believe i have got most of it correct

i am confused in one part though

Heres my ASM of this patch

VKP patch: Select all
; W910 SW-R1FA035
; Enables sliding sounds
; Root: tpa / preset / system / sound / slideropen.mp3
; Root: tpa / preset / system / sound / sliderclose.mp3
; Will not play when silent mode is on.
; v 1.3
; © John North
; (p) Va_st
+10000000
15cfc80: 2AD0 28D0
15cfcd4: 2E20D8E02F20D6E0 004B184701F41712
217f400: 0000000000000000 10B4114B98470028
217f408: 0000 11D1; no sliding sounds when on silent mode
;217f408: 0000 C046; sliding sounds enabled, even if on silent mode
217f40A: 000000000000 1048114B9847
217f410: 00000000000000000000000000000000 00280CD10E480F4B9847002807D10EA1
217f420: 0000000000000000 402C00D014A10648
217f428: 00 48; volume (0x00...0x64)
217f429: 00000000000000 22064B984710BC
217f430: 00000000000000000000000000000000 2E20412C00D12F20004B18478BFE5C11
217f440: 00000000000000000000000000000000 58DE9511E9181C1149E8181199145110
217f450: 00000000000000000000000000000000 6552301151135D1173006C0069006400
217f460: 00000000000000000000000000000000 650072006F00700065006E002E006D00
217f470: 00000000000000000000000000000000 700033000000FFFF73006C0069006400
217f480: 00000000000000000000000000000000 6500720063006C006F00730065002E00
217f490: 000000000000 6D0070003300


Code: Select all
include "x.inc"

branch      equ   0x115CFCD4
hook      equ   0x1217F400+1
address1   equ   0x115CFE8A+1
address2   equ         ; <---- HELP PLEASE HERE
address3   equ   0x111C18E8+1
address4   equ   0x1118E848+1
address5   equ   0x10511499   
address6   equ   0x11305265   
address7   equ   0x115D1350+1



org 0x115CFC80
      BEQ   branch



org 0x115CFCD4
      LDR   R3, off_115CFCD8
      BX   R3

off_115CFCD8   DCD hook




org 0x1217F400
loc_1217F400            
      PUSH   {R4}
      LDR   R3, off_1217F448
      BLX   R3
      CMP   R0, 0
      BNE   loc_1217F42E
      LDR   R0, off_1217F44C
      LDR   R3, off_1217F454
      BLX   R3
      CMP   R0, 0
      BNE   loc_1217F42E
      LDR   R0, off_1217F450
      LDR   R3, off_1217F454
      BLX   R3
      CMP   R0, 0
      BNE   loc_1217F42E
      ADR   R1, aSlideropen_mp3
      CMP   R4, 0x40
      BEQ   loc_1217F426
      ADR   R1, aSliderclose_mp

loc_1217F426            
      LDR   R0, off_1217F440
      MOVS   R2, 0x48
      LDR   R3, off_1217F444
      BLX   R3

loc_1217F42E            
      POP   {R4}
      MOVS   R0, 0x2E
      CMP   R4, 0x41
      BNE   loc_1217F438
      MOVS   R0, 0x2F

loc_1217F438            
      LDR   R3, off_1217F43C
      BX   R3

align 4

off_1217F43C   DCD address1   
off_1217F440   DCD aTpaPresetSyste   ;  <---- HELP HERE PLEASE            
off_1217F444   DCD address3   
off_1217F448   DCD address4   
off_1217F44C   DCD address5   
off_1217F450   DCD address6
off_1217F454   DCD address7   
               
aSlideropen_mp3   du "slideropen.mp3",0

align 4

aSliderclose_mp   du "sliderclose.mp3",0



In the ASM there are parts which say HELP HERE. That is the part i need help with as i dont know what the correct code is for that part.

In the tutorial Shadow Player changed

Code: Select all
off_45C00980    DCD aTpaPresetSyste


To

Code: Select all
off_45C00980    DCD 0x45719CFC


Where did 0x45719CFC come from ?
Last edited by Edgpaez on 29 Jan 2009 01:46, edited 1 time in total.
User avatar
lolittle


Posts: 41
Joined: 19 Jan 2009 23:17
Thanks Given: 8 times
Thanks Recieved: 0 times

RE: Patch Porting doubts and discussion

Postby Đragoblaztr ™ on 29 Jan 2009 02:16

It's the offset where is placed "aTpaPresetSyste", corresponding to an internal fs directory.

If you jump to it (double click) you can view its offset, and can be defined as in Shadow's tuto or this:

Code: Select all
aTpaPresetSyste    equ    0x45719CFC
;[...]

off_45C00980    DCD aTpaPresetSyste


as you want, it's right
Last edited by Đragoblaztr ™ on 29 Jan 2009 03:27, edited 1 time in total.
Image

For this message the author Đragoblaztr ™ has received thanks - 2:
D-Man, lolittle
Đragoblaztr ™
Advanced Porter


Posts: 76
Joined: 09 Oct 2008 00:48
Thanks Given: 271 times
Thanks Recieved: 224 times

RE: Patch Porting doubts and discussion

Postby lolittle on 29 Jan 2009 15:10

thanks man ... i think ive done my first ever asm :grin:

Code: Select all
include "x.inc"

branch      equ   0x115CFCD4
hook      equ   0x1217F400+1
address1   equ   0x115CFE8A+1
address2   equ   0x1195DE58      
address3   equ   0x111C18E8+1
address4   equ   0x1118E848+1
address5   equ   0x10511499   
address6   equ   0x11305265   
address7   equ   0x115D1350+1



org 0x115CFC80
      BEQ   branch



org 0x115CFCD4
      LDR   R3, off_115CFCD8
      BX   R3

off_115CFCD8   DCD hook




org 0x1217F400
loc_1217F400            
      PUSH   {R4}
      LDR   R3, off_1217F448
      BLX   R3
      CMP   R0, 0
      BNE   loc_1217F42E
      LDR   R0, off_1217F44C
      LDR   R3, off_1217F454
      BLX   R3
      CMP   R0, 0
      BNE   loc_1217F42E
      LDR   R0, off_1217F450
      LDR   R3, off_1217F454
      BLX   R3
      CMP   R0, 0
      BNE   loc_1217F42E
      ADR   R1, aSlideropen_mp3
      CMP   R4, 0x40
      BEQ   loc_1217F426
      ADR   R1, aSliderclose_mp

loc_1217F426            
      LDR   R0, off_1217F440
      MOVS   R2, 0x48
      LDR   R3, off_1217F444
      BLX   R3

loc_1217F42E            
      POP   {R4}
      MOVS   R0, 0x2E
      CMP   R4, 0x41
      BNE   loc_1217F438
      MOVS   R0, 0x2F

loc_1217F438            
      LDR   R3, off_1217F43C
      BX   R3

align 4

off_1217F43C   DCD address1   
off_1217F440   DCD address2               
off_1217F444   DCD address3   
off_1217F448   DCD address4   
off_1217F44C   DCD address5   
off_1217F450   DCD address6
off_1217F454   DCD address7   
               
aSlideropen_mp3   du "slideropen.mp3",0

align 4

aSliderclose_mp   du "sliderclose.mp3",0


Just going to wait pateintly for tutorial on the next part lol
Last edited by lolittle on 29 Jan 2009 15:11, edited 1 time in total.
User avatar
lolittle


Posts: 41
Joined: 19 Jan 2009 23:17
Thanks Given: 8 times
Thanks Recieved: 0 times

RE: Patch Porting doubts and discussion

Postby Edgpaez on 29 Jan 2009 16:41

@lolittle
There's something wrong....
branch equ 0x115CFCD4 there's no 115CFCD4 offset, it all should be 115CFCD4 + Base Address = Real Offset


To port you can try this:
Porting Lib Funcitions

is basically the same thing, main difference is that you don't have to reverse bytes with EtryPoint, just port the same way :grin:
Yo can do this:
branch equ 0x45635241 ;0x45201236

0x45635241 : Ported
0x45201236 : Original offset from patch..

And so you won't get confused :P
User avatar
Edgpaez
Team Leader


Posts: 613
Joined: 09 Oct 2008 00:42
Thanks Given: 888 times
Thanks Recieved: 732 times

RE: Patch Porting doubts and discussion

Postby Shadow Player on 29 Jan 2009 17:49

@Edgpaez: It's DB3150, not DB2020

For this message the author Shadow Player has received thanks - 2:
Edgpaez, extasis5256
Shadow Player
Founder


Posts: 643
Joined: 06 Oct 2008 23:44
Thanks Given: 520 times
Thanks Recieved: 935 times

RE: Patch Porting doubts and discussion

Postby lolittle on 29 Jan 2009 18:05

so is it right or wrong :confused:
User avatar
lolittle


Posts: 41
Joined: 19 Jan 2009 23:17
Thanks Given: 8 times
Thanks Recieved: 0 times

RE: Patch Porting doubts and discussion

Postby andhe7 on 29 Jan 2009 21:39

Can this be an entrepoint?

11625bc: 2149201C 214DA847 <---------??
Image
andhe7
Novice Porter


Posts: 54
Joined: 19 Dec 2008 05:11
Thanks Given: 87 times
Thanks Recieved: 129 times

RE: Patch Porting doubts and discussion

Postby Mojsa on 29 Jan 2009 22:03

Nope :)

db2020: 44 and 45

At a2 11 and 12 :P
Last edited by Mojsa on 29 Jan 2009 22:04, edited 1 time in total.

For this message the author Mojsa has received gratitude :
Đragoblaztr ™
Mojsa
Advanced Porter


Posts: 368
Joined: 25 Oct 2008 16:08
Thanks Given: 241 times
Thanks Recieved: 283 times

RE: Patch Porting doubts and discussion

Postby andhe7 on 30 Jan 2009 01:29

and...

db2010 ????

is = db2010 44 and 45 ?
Image
andhe7
Novice Porter


Posts: 54
Joined: 19 Dec 2008 05:11
Thanks Given: 87 times
Thanks Recieved: 129 times

RE: Patch Porting doubts and discussion

Postby Edgpaez on 30 Jan 2009 01:34

Yeap:

DB2020:
- Entrypoint -> 44 and 45.
- Heap Adress ->20XXXXXX.

DB2010:
- Entrypoint -> 44 and 45.
- Heap Adress ->4CXXXXXX.

A2:
- Entrypoint -> 11 and 12 (not so sure)
- Heap Adress -> No idea ¬¬

Regards

For this message the author Edgpaez has received gratitude :
andhe7
User avatar
Edgpaez
Team Leader


Posts: 613
Joined: 09 Oct 2008 00:42
Thanks Given: 888 times
Thanks Recieved: 732 times

RE: Patch Porting doubts and discussion

Postby andhe7 on 30 Jan 2009 01:52

what it is error ???

Code: Select all
accesos.asm [18]
org hook1
x.inc [117] org [2]
dw off
error: invalid name.
cant open temp.bin
Image
andhe7
Novice Porter


Posts: 54
Joined: 19 Dec 2008 05:11
Thanks Given: 87 times
Thanks Recieved: 129 times

RE: Patch Porting doubts and discussion

Postby Shadow Player on 30 Jan 2009 02:01

post entire .asm file please. If you want to protect the code use the [dev] tag.
Shadow Player
Founder


Posts: 643
Joined: 06 Oct 2008 23:44
Thanks Given: 520 times
Thanks Recieved: 935 times

RE: Patch Porting doubts and discussion

Postby andhe7 on 30 Jan 2009 02:27

it is asm error...

Hidden code, Developers Access Only.

it is asm original patch:

Hidden code, Developers Access Only.
Last edited by andhe7 on 30 Jan 2009 03:18, edited 1 time in total.
Image
andhe7
Novice Porter


Posts: 54
Joined: 19 Dec 2008 05:11
Thanks Given: 87 times
Thanks Recieved: 129 times

RE: Patch Porting doubts and discussion

Postby Shadow Player on 30 Jan 2009 02:30

Code: Select all
0X444DAEFC


should be:

Code: Select all
0x444DAEFC


X -> x

PS: Same in dir1 - dir5
Last edited by Shadow Player on 30 Jan 2009 02:30, edited 1 time in total.

For this message the author Shadow Player has received gratitude :
andhe7
Shadow Player
Founder


Posts: 643
Joined: 06 Oct 2008 23:44
Thanks Given: 520 times
Thanks Recieved: 935 times

Next

Return to VKP Patches

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style by Gokin Studios