:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sat Dec 03, 2022 3:22 am
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum » Vinifera
Engine question: symbols
Moderators: Global Moderators, Vinifera Moderators, CCHyper
Post new topic   Reply to topic Page 1 of 1 [4 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
GREEN
Vehicle Drone


Joined: 26 Dec 2016

PostPosted: Thu Oct 20, 2022 1:11 pm    Post subject:  Engine question: symbols Reply with quote  Mark this post and the followings unread

Have you considered changing the .exe export table to include the known methods and data externs?

How do you build the fake .pdb from .h ?

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Thu Oct 20, 2022 11:51 pm    Post subject: Re: Engine question: symbols Reply with quote  Mark this post and the followings unread

GREEN wrote:
Have you considered changing the .exe export table to include the known methods and data externs?

How do you build the fake .pdb from .h ?


All the information from the TS++ project on the GitHub repo can be found as a PDB file in "pdb/GAME.pdb".

Back to top
View user's profile Send private message
GREEN
Vehicle Drone


Joined: 26 Dec 2016

PostPosted: Sun Nov 06, 2022 11:19 am    Post subject: Reply with quote  Mark this post and the followings unread

I can have a C debug breakpoint at AddMessage.
I dont yet know how to read the message string, nor how to detour/hook the address just yet.

Code:


00619960 24 7E                and         al,7Eh  
00619962 00 8D 72 04 EB 05    add         byte ptr [ebp+5EB0472h],cl  
00619968 BE CC 7B 86 00       mov         esi,867BCCh  
0061996D A1 88 C4 74 00       mov         eax,dword ptr ds:[0074C488h]  
00619972 DD 80 68 0C 00 00    fld         qword ptr [eax+0C68h]  
00619978 DC 0D B8 B1 6C 00    fmul        qword ptr ds:[6CB1B8h]  

EAX = 02E72DE0 EBX = FFFFFF00 ECX = 00000001 EDX = 02EDE7E8 ESI = 02EDE7EC EDI = 2687B490 EIP = 0061997E ESP = 0028F26C EBP = 00000000 EFL = 00000202

0061997E E8 AD 89 09 00       call        006B2330  

00619983 8B 0E                mov         ecx,dword ptr [esi]  
00619985 50                   push        eax  
00619986 68 46 40 00 00       push        4046h  
0061998B 55                   push        ebp  
0061998C 51                   push        ecx  
0061998D 55                   push        ebp  
0061998E 55                   push        ebp  
0061998F B9 34 2C 7E 00       mov         ecx,7E2C34h  
00619994 E8 47 96 F5 FF       call        00572FE0  



DEFINE_IMPLEMENTATION(TextLabelClass* MessageListClass::Add_Message(char const *, int, char const *, ColorSchemeType, TextPrintType, int), 0x00572FE0);

EAX = 0000021C EBX = FFFFFF00 ECX = 007E2C34 EDX = 00000000 ESI = 02EEE7EC EDI = 2683B490 EIP = 00572FE0 ESP = 0028F250 EBP = 00000000 EFL = 00000212

+      ((char*)0x02EEE7EC)   0x02eee7ec ""   char *



00572FE0 81 EC AC 00 00 00    sub         esp,0ACh  
00572FE6 53                   push        ebx  
00572FE7 55                   push        ebp  
00572FE8 56                   push        esi  
00572FE9 8B B4 24 C4 00 00 00 mov         esi,dword ptr [esp+0C4h]  
00572FF0 85 F6                test        esi,esi  
00572FF2 57                   push        edi  
00572FF3 8B D9                mov         ebx,ecx  
00572FF5 75 0F                jne         00573006  
00572FF7 5F                   pop         edi  
00572FF8 5E                   pop         esi  
00572FF9 5D                   pop         ebp  
00572FFA 33 C0                xor         eax,eax  
00572FFC 5B                   pop         ebx  
00572FFD 81 C4 AC 00 00 00    add         esp,0ACh  
00573003 C2 18 00             ret         18h  

>   ts-spawn.exe!00572fe0()   Unknown   No symbols loaded.
    [Frames below may be incorrect and/or missing, no symbols loaded for ts-spawn.exe]   Unknown   No symbols loaded.
    ts-spawn.exe!00619999()   Unknown   No symbols loaded.
    ts-spawn.exe!00406e72()   Unknown   No symbols loaded.
    ts-spawn.exe!0048bae0()   Unknown   No symbols loaded.
    ts-spawn.exe!0048b5d2()   Unknown   No symbols loaded.
    ts-spawn.exe!004fce23()   Unknown   No symbols loaded.
    ts-spawn.exe!006a6130()   Unknown   No symbols loaded.
    ts-spawn.exe!00462aa1()   Unknown   No symbols loaded.
    ts-spawn.exe!006019c0()   Unknown   No symbols loaded.
    user32.dll!_RealDefWindowProcWorker@24()   Unknown   Symbols loaded.
    kernel32.dll!@BaseThreadInitThunk@12()   Unknown   Symbols loaded.
    ntdll.dll!___RtlUserThreadStart@8()   Unknown   Symbols loaded.
    ntdll.dll!__RtlUserThreadStart@8()   Unknown   Symbols loaded.




Visual Studio does not like the pdb so it wont resolve any methods on stack trace.
Code:
"\TSpp\pdb\GAME.pdb"

---------------------------
Microsoft Visual Studio
---------------------------
A matching symbol file was not found in this folder.
---------------------------
OK  
---------------------------



    Any hints how to read scenario message text? so i can draw it somewhere else
    Any hints how to rebuild a working pdb for tspp_definitions.cpp ?
    Any hints how to hook/detour, maybe just write a jump instructon?

Back to top
View user's profile Send private message
GREEN
Vehicle Drone


Joined: 26 Dec 2016

PostPosted: Mon Nov 07, 2022 5:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

Code:

// 0x00474E70 Fancy_Text_Print $ADDRESS {(char*)EAX} {('\0' != *((char*)EAX))}

//Fancy_Text_Print 0x005ADF94 0x0076d450 "Compiling wartime conventions..." true
//Fancy_Text_Print 0x005ADF94 0x0076dc58 "Gathering intel on involved factions..." true
//Fancy_Text_Print 0x005ADF94 0x0076e460 "Creating theories on likely enemy plan..." true
//Fancy_Text_Print 0x005ADF94 0x0076f470 "Secondary check of combat zone..." true
//Fancy_Text_Print 0x005ADF94 0x0076fc78 "Deploying forces to combat zone..." true
//Fancy_Text_Print 0x005ADF94 0x00770480 "Final analysis of outcome..." true

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] Mark the topic unread ::  View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum » Vinifera
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1597s ][ Queries: 11 (0.0100s) ][ Debug on ]