See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: [closed] UCGO beta test ver 091216  (Read 32897 times)

0 Members and 3 Guests are viewing this topic.

Offline Fox-Terrier

  • League of
  • Legend
  • ******
  • Posts: 1426
  • Country: Switzerland ch
  • Karma: 28
  • :D
Reply #125 - 06 January 2010, 18:36:58
ALLELUIA DAN !!! :hot:

unbelievable ! 8o
everything worked ! :hot:
there is no vessel number limitation anymore ! :hot:

Dan, you are the very best ! :wor: thank you ! :wor:



Message modifié ( 06-01-2010 18:37 )


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #126 - 06 January 2010, 18:51:15
Quote
Fox-Terrier a écrit:
my current modules file is the same size as before (104 MB), were they many changes ?

Exactly 6 bytes :)

I replaced two assembly instruction "MOV" one by NOP and the other by a JMP
The problem was idiot: one variable was used two time into a "for" loop
one for the main loop and the other one to add "_" char into UMmu name
If the name of UMmu was longer than ship list it caused no problem, else
CTD.

As it depended also of memory loading the CTD was not always here, this is why
it was so difficult to detect and clear it.

I patched in assembly so the EDX register (2nd loop) isn't saved anymore
to the stack main loop's.

IE:

Before patch:

Code: [Select]
10006242  33D2                       xor edx,edx
 10006244  8BC6                       mov eax,esi
 10006246  89542418                   mov [esp+18h],edx < ---- problem
 1000624A  8D7801                     lea edi,[eax+01h]

[snip long code]

 10006277  84C9                       test cl,cl
 10006279  75F7                       jnz L10006272
 1000627B  2BC7                       sub eax,edi
 1000627D  3BD0                       cmp edx,eax
 1000627F  72DF                       jc L10006260
 10006281  89542418                   mov [esp+18h],edx < ---- problem

After patch:

Code: [Select]
10006242  33D2                       xor edx,edx
 10006244  8BC6                       mov eax,esi
 10006246  90909090                   nop < ---- replaced by NOP
 1000624A  8D7801                     lea edi,[eax+01h]

[snip long code]

 10006277  84C9                       test cl,cl
 10006279  75F7                       jnz L10006272
 1000627B  2BC7                       sub eax,edi
 1000627D  3BD0                       cmp edx,eax
 1000627F  72DF                       jc L10006260
 10006281  EB02                       jmp  L10006284 < ----- replaced by jump

Cheers

Dan
(html doc almost finished)



Message modifié ( 06-01-2010 18:54 )


Offline sunshine135

  • Hero Member
  • *****
  • Posts: 547
  • Country: United States us
  • Karma: 3
  • I fly by the seat of my pants!
Reply #127 - 06 January 2010, 20:28:55
Dan,

You are a frigging genius! Most people look at hex and go huh? What?

You have more programming talent in your little finger than I have in my whole body!

Cheers,


"Sun Dog"

Offline Fox-Terrier

  • League of
  • Legend
  • ******
  • Posts: 1426
  • Country: Switzerland ch
  • Karma: 28
  • :D
Reply #128 - 06 January 2010, 20:43:24
I didn't know you use assembler to code an orbiter addon (or is it only for the patch ?)

the few assembler I know is the one I use to program small robots (no professional work, more like a hobby) and I am just a
beginner at it ;)

but I understood the problem :)

why is the address increasing 2 by 2 (2, 4, 6 etc.) ?

Code: [Select]
10006242  
10006244  
10006246



Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #129 - 06 January 2010, 22:15:06
Quote
Fox-Terrier a écrit:
is it only for the patch ?)

Only for the patch,

I started learning programming more or less with assembly this is why I know it
and know how C++ translate into assembly. (I used assembly a lot for FsPassengers
to add features not "available" by the normal SDK, fortunately Orbiter have a good C++ SDK)

Quote
why is the address increasing 2 by 2 (2, 4, 6 etc.) ?

It increase by the number of byte in the instruction.

In blue the instruction byte, in yellow it's only the "readable" version for humain as shown by a disassembly utility:

Code: [Select]
10006242  33D2                       [glow=yellow,2,300]xor edx,edx[/glow]

So here you have two bytes instruction that correspond to "xor, edx, edx" (set edx to zero)

Here the adress increase by 4 bytes (0x90 0x90 0x90 0x90) four "NOP" (do nothing)

Code: [Select]
10006246  90909090                   nop < ---- replaced by NOP
 1000624A  8D7801                     lea edi,[eax+01h]

And here the whole sequence of bytes that the patcher detect (signature) in the file, if you look it correspond to the first
code: (In yellow the code that is replaced by the jump, if you search this sequence in a unpatched dll with an hexe editor you'll find it)

Code: [Select]
16 5F 75 04 C6 04 16 20 8B C6 83 C2 01 8D 78 01 8A 08 83 C0 01 84 C9 75 F7 2B C7 3B D0 72 DF [glow=yellow,2,300]89 54 24 18[/glow] DD 44 24 20 E8
Quote
sunshine135 a écrit:
Most people look at hex and go huh? What?

I can't read yerogliph either, everyone's job :badsmile:

Dan



Message modifié ( 06-01-2010 22:17 )


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #130 - 07 January 2010, 17:04:40
closed, see the new beta test thread

« Last Edit: 07 January 2010, 17:04:40 by DanSteph »