I have the rdata section translated, however I do not have any address pointers changed, which would be the next phase. I am not that good enough with olly, so you are welcome to what I have done. just let me know
Yes... if pointers need updating I'm happy to take your translations and combine them with Butchered. Full credit will be given.
No, it's okay... it could have done with the original Korean strings along side the translation so you can look up the original locations, but that's all.
--- EDIT ---
Brain dump coming up.
Labels and comments are the only way *I* can keep track of what I'm doing with this client... if people want to join in, help out or compare notes, they would be very useful... and if I loose them, I'm going to be buggered. XD
Going to each one in Olly and filling the label is boring, but better than nothing. Getting the .UDD to follow the file is a pig, but I do have a method (manual) that I will have to write up and / or create a program to enable me to share .UDD files (comments and labels all in) with the rest of you.
For now, this will have to do.
Oh... if you are trying to make sense of these, the convention is quite easy, "sub" is a subroutine, anything in code that isn't a sub, is just an interesting instruction to edit. Unless it's a VC, in which case it's a "sub" that isn't part of the PT program, but comes directly out of the VCRT.lib that it's linked against.
A "jmp-sub" happens occasionally, and they are CALLed, but don't RET, because they are only a JMP to the actual "sub". Very rarely this is useful because the JMP can be "short" where the CALL would have to be long... in the PT code they are usually just a waste of space. I presume this is just an example of the compiler creating complexity in the name of optimization, though I can't see any advantage being achieved under the circumstances it is used.
"sz" is a Zero terminated string "psz" is a pointer to a Z-String.
"dw" is an int / Long or DWord how ever you want to think of it.
"b" is Boolean. It's either 1 or 0, but usually stored in a DWord.
"f" is a floating point value. PT usually stores these as IEEE integers, and converts with _itofp type call.
"pp" is a pointer to a COM object, it's only used for ppDS1 and ppDS2, the two DirectSound Objects created by PT. (as far as I can see, only the methods and events of ppDS2 are used in the code, ppDS1 is an inquiry line as to the capabilities of the host sound chip)
"s" is a Struct, the name tells you what kind of struct... taken from Platform SDK, I've mostly labeled RECT structs.
"t" is a Kernel Based Time / Tick Count. It's still a dw, but can be seen in smaller groupings.
"h" is a handle. And specifically (so far) an OS handle. For example, and hWnd (Window Handle) or "hFnt" Handle to a Font. PT creates it's own "handles" for bitmaps and such using a string hashing algorithm but I have labeled those just as dw, as that is what the algo spits out, and what it indexes the allocated resources by. (as far as I can see, I'm still looking into the finer details.)
20-07-10
bobsobol
Re: KPT1977 NoXTrap --- Butchered!
From This tread as we (or I) went off-topic and I don't want to flood Wormys' thread any further.
Quote:
Originally Posted by bobsobol
When you set a window to be a "fixed size", as I did, intended to do, and clearly stated was my intention (so you don't every get stretched blocky pixels in the wrong aspect ration etc. etc. etc.) it is expected that you will not be able to "Maximize" it. That would be considered a "resize". If you want it full screen don't run it in a window.
I can still minimize, restore from minimized or close on my system though... are you sure you can't? What you can't do (by design) is maximize it, or restore it from maximized, or pull it out from the window borders, or select "Size" from the context menu of the toolbar or anything else that may change the dimensions of the window after it has been created.
Allowing the game client to respond to those resizes properly would require considerably more effort... though I think it can be done during frame updates (check the size of the client area) that's a lot more processing per-frame, as is the traditional per-pixel stretch. :(
Quote:
Originally Posted by tangodown
Well now I know...Have you ever seen the cartoon character Mr. MaGoo...that's me...I need to read more carefully as my eyesight is very poor atm. If you can visualize this..
A person with glasses on, using a magnifying glass, left eye is closed and trying to read...It's driving me batty, but I will not quit
That's fine (and yes, I remember Mr.McGoo)... I'm adding "features" all the time, they are "different", which most people here now know is where I "get off", and many people are seeing them a "bugs" or "glitches" because it's not what they are used to. Now.. strictly speaking, this is a "side effect" of the documented feature. Because the "side effect" is not documented, it could be seen as a bug / glitch. But it's not documented as such, because it is documented elsewhere as a feature of "fixed frame" windows in the Windows OS... and that is what I have documented that I have used.
I don't know about your experiences, but outside PT, any game that I've seen with a "Run in a window" option still does not let you arbitrarily resize the window. (Except SimCity 2000 style games which actively use the OS windowing system anyway.)
I know that the Beta 3 release will need these new / different "features" written up in more detail (full implications of the changes) but for the time being, I'm implementing them, and documenting (by posting) only that the implementation has been made... leaving brave Release Candidates testers such as yourself to figure out what the implications of these changes are.
Feelgood Factor
I had a good long play on the RC3b client the other day (training skills) and while I still think it's slow (comparing to other similar games and to the huge increase in processing power over the last decade and the performance increase you see when playing other games of this age on modern hardware) particularly during disk access, it is actually playing pretty smoothly once you settle down to a spawn point on a field... and I'm quite pleased about that.
I know the minor mods I'm making can only be shaving the odd millisecond (if that) out of routines which I guess are not called all that often, but as I'm tweaking 5 or 6 new routines a day, (except days off to do something else) I guess it's all adding up.
Update
I'm currently implementing streaming MP3 / OGG files to get rid of the dead weight of all the PCM sound files in the install folder, and hopefully save some memory (whilst eating up CPU time) in the process. But since the game is slow when loading, not when playing stuff that is already in memory, reducing memory paging operations to load in massive PCM background music should help. I know a lot of people (myself included) just don't have the BGM playing because of this, but you still get it during login and character selection.
I'm being cautious with this "feature", partly because it requires 3rd party DLLs (BASS.dll at the moment, but I hope to implement FMod as an alternative) and partly because, while I can see no down side in terms of the music files, if / when I implement these functions for sound effects, it may be prudent to load OGG / MP3 files and keep them decompressed in memory anyway... and since these libraries provide functions for accelerated 3D sound, there may be options to "position" the sound in relation to the player, which are not currently a function of the PT Game. So to achieve that, I will need to find out where to locate the information I would need in order to know what player / NPC / Monster created the sound event and where they are located in relation to the player character.
Right now, (as originally written) the client simply passes the name of a sound file to a routine which hashes the name, checks if that hash is loaded, and if it is passes it to WinMM which is already associated with the DirectSound device opened during startup, without even a mention of whether the sound should come from the left, or right speaker. XD
So anyway... Unusually, I'm not replacing the existing routines here, I'm looking for, and loading the library dynamically (Via LoadLibrary() API) and if it is present, then I bypass the normal WinMM routines with my BASS.dll ones. (FMod should work the same) If the DLL is not present on the host system, the game should fall back to the traditional routine.
Eventually, I am going to have to re-factor the PE.... Add a section or expand an existing one or shift what information is found in what section or something. Because I can see something of that nature will be required for correct translation, and I can see that adding and removing exports will be required, all of which should be done before the resource section (I know many Devs and private servers here ignore that, but it should) which means pulling the resource section off (deleting it) and putting it back on again afterward... Luckily, I have managed to recreate the RC file that generates it, and can compile to a new .RES which I can then re-link to the executable. And that needs a Security Manifest to be "Designed for Windows XP" legal anyway.
I'm slowly learning how memory management works in the game, and how resources like sounds and images are loaded into the game... and there's definitely room for improvement on the BMP and TGA files, if I can figure out how they are stored internally... since I can't understand how the 3D scene render routines work. But as long as the in-memory copy uses the same format (and they don't seem to remain BMPs or TGAs by the time they get to the renderer) then the loading routines should be able to be replaced with something which will read PNGs or DDS files.
If anyone else can figure out how to replace the 3D renderer with something that creates a Direct3D scene, DDS would be a big plus. But as it stands, it doesn't really seem to matter all that much.
I also see distraction coming as I find the routines which write SMD, SMB and INX data from the INI, INF and ASE files which (internally) the game still requests... I know many people want something that will reverse these, and while a few people have access to some solution they are not sharing. I don't know who I could delegate that "distraction" too so I could maintain focus on this client.
Open Question
The "Hardware Cursor" "feature" is (as demonstrated) easily toggled on or of with a change to 2 bytes... one to disable one, one to disable the other. And as previously stated, they are both enabled in the exe as I've given it, so you only need to change one byte or the other, as suits your desire. But should that choice be made by the publisher (private server etc.) or by the end user (the players)?
I've only held off on applying hardware cursor shape changes because it calls for importing more APIs in the PE file... so it needs that PE re-factoring to be decided upon and done first. That being done, would you like to be able to add a "hardware cursor" option to your launcher and let the players decide, as many other games do, or do you want to keep that decision static for all players on your server?
20-07-10
tangodown
Re: KPT1977 NoXTrap --- Butchered!
You and I had a great session on translation a few months back. I still have all those posts and screenies for reference. As far as experience goes, I am an old IBM mainframe systems programmer, my PC experience is not as extensive, however I do have a good logical understanding of applications, I just need to tie those two together.
I like the way you tackle things, you are very thorough in explaining your thoghts, its my job to make sense of them.
I have several clints and servers that I have collected over a period of time, my concern is that I may have messed up along the way and I really need to start feom the begining. I can take a few approaches to this
1..Use the PPT that you developed
2. Use the Ultimate PT server with all of its tools
this is where I tend to go the wrong way, lets say I just got the latest Korean client from the Korean website, I have this client that you have been working with, I would replace the client with yours and also all the other folders from another site. Even though I can get to play the game
I could be meesing up big time. Until I get the basics right I cant answere just yet, however my gut say to make the cursor as server side choice
Sandurr wrote a lot of the routines to manage those file types, I can ask my son (Robinette) as he worked with Sandurr sesigning the weapons and gear using #DSmax so he got familiar with that process..I will do what I can.
21-07-10
trungnt88
Re: KPT1977 NoXTrap --- Butchered!
I used JayMoko KPT Server 1977 using many character (brand-new character, normal character, extreme-character) with :
+ "KPT1977NoXTrap2" (Post #1) > Everything's fine :)
+ "KPT1977Butchered RC3a Beta" (Post #6) > Error Message from Server then reconnect continuously (Post #14)
Of course, I used the same server/client files for both tests (only game.exe is different).
Now I realized that my previous opinion is totally WRONG! (Post #21)
Spoiler:
Quote:
Originally Posted by trungnt88
I found that, Server DC happened only if I logged in game with my Super-man character, who got super weapon and armor (high stats items :D).
21-07-10
bobsobol
Re: KPT1977 NoXTrap --- Butchered!
@tangodown:
I know where you are. ZPT was my first attempt, based on Server_619 and had a lot of issues, but also a lot of features. PPT is meant to be the absolute bare basics, and it is, provided you don't use the EPT based PPT Client everything that should work in a basic PT server does (except Clans) right out of the box.... the other thing I really like about that, is that drops and exp and monsters and bosses are all totally pure as they where on the official servers around KPT185x.
Ultimate files are like the 619 ones... they are heavily modified from the originals, include extra drops that shouldn't be there and I think even the Exp rate is changed. That's a great base for an uber private server, but I want something more legitimate.
There is no reason you can't use my PPT installer to install and setup the ultimate server files.
Personally, I'd skip them, and go straight to the 1977 server, perhaps over a KPT ET 2.2 base, (to cover any low end stuff that JayMoko may have missed) and adding Wormys' (trungnt88) ET3f AOI.
@trungnt88: So, it's one character on the RC3b which causes DC, but the same character does not cause issues on Beta 2? Have you tried RC3a? Can I have a copy of your characters .DAT files so I can try this out for myself?
There are many things that trigger DC from the client side, most of them are connected with the client thinking that you are cheating... but the only ones I've taken out are connected with not finding XTrap running, I haven't added any. One idea that springs to mind is some of the speed up functions I've added... since these could heighten the clients disbelief in your powers, but when I checked, I could gain Exp very quickly on my client compared to an 1873 client before causing DC. (I have to make about 20 18,000,000 Exp kills in under a minuet to get DC4)
You are Discoing before you even hit the field to draw a weapon... I'm not sure how anything I've done could cause that, but if it happens in the RC and not in the last beta, it must be in the code I've changed somewhere.
The RC3b has an additional patch do get around a dynamic (indirect) call to an old XTrap routine, which was not present in RC3a or Beta 2. So... this is why I ask if you've tried that. My tests suggest it worked fine, and runs all the same code, except the call to an XTrap routine which is now just a RET instruction... But since there is memory allocation, and critical section switching within that routine, if I made a slight mistake it could have serious consequences. (I would hope, since I've run that code over thousands of times now, I would have seen them already if there was some mistake... but just sometimes, the circumstances have to be exactly right.)
Regardless, I need to find what code causing problems for this character... If I'm right in thinking that your other test characters are still okay, whatever exe you use.
21-07-10
trungnt88
Re: KPT1977 NoXTrap --- Butchered!
Tried with v3a and I got the same result with v3b. Even worse, when I tried to exit game (by hitting Shift + Esc) the application had been not responding xD.
After that, I tried to test with v3b again and I found that : connection between CLIENT - SERVER was NOT DISCONNECTED, just "reconnect". Why? Coz when I was testing, I had a phone call. So I let the game there, then I was back and found that, all NPC come back again. After 10-20sec, all NPC gone with the wind xD And I got several Server Message (15-20 times) and all NPC returned again! IDK WTH happening O_O
However, v2 still OK :)
---
EDIT 1 : I've added my character data :cool: In testing progress, I used only "Wormy" (pikeman) character :cool:
---
EDIT 2 : It's not DC as I told you above, however It's needed to confirm that, I stay in the village and got those Server Message so it wasn't DC 4 :)
---
EDIT 3 : Data files removed :)
21-07-10
tangodown
Re: KPT1977 NoXTrap --- Butchered!
I am using the Ultimate KPT and your clients rc3a rc3b rc3c
So it looks like i am in the zone.
22-07-10
bobsobol
Re: KPT1977 NoXTrap --- Butchered!
@tangodown:
Wait...
a) I haven't written RC3c yet. XD
b) What do you mean by "Ultimate KPT"? Because that's what I said I would *not* use, but would base from KPT ET 2.2 and add JayMoko and Wormys' updates to that.
@tringnt88:
I'm looking at "Wormy"... it is very odd... he always logs errors on my server, whether the client scoops or not. But why one client should scoop out and the other not I'm not sure... RC3b is running much faster though, especially with Wormy, but I think that's because most of the time he doesn't have to think about NPCs as there are none. XD
22-07-10
tangodown
Re: KPT1977 NoXTrap --- Butchered!
Ultimate is the same server with a different name, however just to be on the same page I will start using that version.
I must have imagined RC3...
22-07-10
bobsobol
Re: KPT1977 NoXTrap --- Butchered!
No... it is RC3, but only (a) and (b) variants... there is no (c). If there was, it would be Gregoorys' method, which is great if you are happy to add imports.
Back at Wormy... I have added variant (b) methods and features to Beta 2 without the optimization enhancements of RC3... seems to be going well though it's a big step backwards for me. Here's a link so you can confirm for your self.
28-07-10
tangodown
Re: KPT1977 NoXTrap --- Butchered!
I find it very odd that when I look at KPTTrans I see things like Atk Pow
but nowhere in the .rdara section can I find this (after translation). This makes me wonder what I missed along the way.
28-07-10
bobsobol
Re: KPT1977 NoXTrap --- Butchered!
More strings exist in the .Data section tango. RData is only half of the strings... it's just the easier half, as it's pretty clear what is not a string in .RData, .Data contains all sorts of stuff, only a small part of which is string data. Worse, much of it is string data which cannot be altered without corrupting checksums which then need to be fixed as well as pointers. :wink: But that is what the .Item section is for. :lol:
28-07-10
tangodown
Re: KPT1977 NoXTrap --- Butchered!
Thanks for clearing that up...I dont think i will be messing in there anytime soon...lol .Item section???
28-07-10
bobsobol
Re: KPT1977 NoXTrap --- Butchered!
Well... there's no "." and it's called "Items". It comes just after "GFantasy".
28-07-10
tangodown
Re: KPT1977 NoXTrap --- Butchered!
it helps to look in the right place...the server exe