News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: "Never use hex-editors for translating a game". Isn't hex-editing the only way?  (Read 9503 times)

aweigh

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
I noticed this while reading a post:

"You don't want to use a Hex Editor for translations. That's like opening a bottle of wine with a jackhammer. Use Hex Editor for investigating the formats, then you can approach a possible way of turning your results into a translation."

I don't understand. It gives you the most access and the most freedom over the game data (and obviously the script).

I'm frankly confused now: what should one be doing then instead of using a hex-editor, looking up the japanese text and translating it by typing on your keyboard? I don't mean that in a sarcastic manner... seriously, tell me. If I'm missing out I wanna know.

USC

  • Submission Reviewer
  • Full Member
  • *****
  • Posts: 248
  • Obviously Outdated
    • View Profile
I imagine they meant that it's better to use hex editors to figure out the script location and format, then write something that will export the entire thing out for you in plain text.

From there, you can easily edit/proofread the dialogue, then re-insert it back into the game. Manually editing the script in a hex editor would be overkill.

aweigh

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
aw but then you miss out on counting each letter you type as you reach the limit for that window box and then erasing what you just typed as you re-write on the fly until you notice later you wrote over an invisible @ and it won't display... that's the best part!

FAST6191

  • Hero Member
  • *****
  • Posts: 2621
    • View Profile
A hex editor is a very dumb tool when all is said and done. Very potent and allows you to do whatever you can do to a file but by no means is it always going to be the superior way to set about it.

There are many ways to set about editing text, broadly speaking there will be two main ones though

1) Use premade/existing tools for extraction and insertion. these will typically be almost scripting languages unto themselves. Around here the dominant ones would be Atlas and Cartographer. Others however include kruptar ( http://www.romhacking.net/forum/index.php?topic=16496.0 ) and crystaltile2 (don't use it for script extraction, it has some nice searches I do not see elsewhere but that is about it)

2) Write your own tool to extract and insert. As it is not a massively demanding task this would usually be taken care of with a less demanding language which is where some hackers come up short. You will probably want something that supports some flavour of table format and then also something that will attempt to display the game with similar limitations to what you might see on screen (characters per line, character spacing, maybe the font....).

The only time you would really want to be using a hex editor is if you have maybe a couple of paragraphs, you typoed and put a character when you meant another or something equally minor.

Basically if you have got it then use the tool for the job, it might be doable with more elementary tools but it is probably going to be a pain.

aweigh

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
yeah, all that sounds about right. obviously translating a 12mb .bin file that contains nothing but dialog via hex editor will be time consuming: but if you want something done RIGHT you have to do it with a personal touch.

best way to get a better translation in the end is if you do every single letter.

of course i have nothing against extraction tools just yesterday i had spent like a week looking for tools to rip the menu tiles from elminage 1 psp so i could replace the menus from the (japanese language) elminage 2 psp with the english ones from the 1st game. They didn't change or add any new spells or skills so all of the tiles worked out perfectly. been very happy with that.

just thinking of having to spend all those hours, days probably, grinding away with some image editing software hacking the elminage 2 menu tiles... UGH. i'd rather die. i find editing images 1000x more tedious and unsatisfying than hex editing.

i've never used the two programs you mention for ripping text but i have seen them bandied about on forums like this one for a while now. i've never bothered checking them out as i stick to Wizardry-style dungeon crawlers which are extremely light on NPC dialog... but my pipe dream is to eventually someday translate elminage 2 and 3 and those have huge, huge scripts.

FAST6191

  • Hero Member
  • *****
  • Posts: 2621
    • View Profile
best way to get a better translation in the end is if you do every single letter.

of course i have nothing against extraction tools just yesterday i had spent like a week looking for tools to rip the menu tiles from elminage 1 psp so i could replace the menus from the (japanese language) elminage 2 psp with the english ones from the 1st game. They didn't change or add any new spells or skills so all of the tiles worked out perfectly. been very happy with that.

just thinking of having to spend all those hours, days probably, grinding away with some image editing software hacking the elminage 2 menu tiles... UGH. i'd rather die. i find editing images 1000x more tedious and unsatisfying than hex editing.
Best way to get a better translation is to be able to focus on the translation and have something else take care of the tedious stuff like managing character counts, placeholders, formatting and whatever else. Given it is probably not going to be me with all my knowledge of encodings, text systems, the hardware of the device the code will run on and computer programming as much as someone that spent an equal amount of time instead learning languages that does the translation then even better if they do not have to worry about it.

Or if you prefer then maths wise I am better than my computer, other than the time I made it into an AI it is mostly a piece of silicon after all, but I would still trust my computer to recalculate pointers for me far more than I trust myself to stay focused.

Assuming you do not mean like some N64, GC and wii translator do with texture replacements then by all means find image editing more tedious than hex editing. Personally I happen to find sewing more tedious than kayaking so I know the feeling.

There are times where it is going to be quicker and easier to hex edit but for teaching new people then it still has to be "until you can argue otherwise do not use a hex editor to translate more than a few paragraphs, fix simple typos or occasionally translate a menu.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6927
  • *sigh* A changed avatar. Big deal.
    • View Profile
As someone that spent years doing everything by hex editor, I say inserting text by hand into hex editors is not good.

When I insert text, I use a custom tool (basically I have template dumper and inserter programs I wrote that I modify for each translation). I have it modify the text, and modify the pointers, and I tell it how much space I have available. If the limit is exceeded, the program tells me I ran out of room and it won't insert any more. No need to count the length of individual strings and pointer editing takes care of that.

You know that with manually typing text into a hex editor, if you make a typo (or decide to change text) needing even ONE more character, you have to retype ALL the other text?
Unless you're suggesting always sticking to the original string length which is just... no. :P
"My watch says 30 chickens" Google, 2018

aweigh

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
I DUNno i've only ever used a hex editor to translate stuff. i've never used anything else and it has been a great learning experience; i've only started editing/translating for a few months. I have 1 game waiting for the script tog et translated and then i'm going to hex-edit it in manually just like i've done the entire game, and currently doing "everything-but-npc-dialog" hex editing/translation on two other games until i can get those two games' npc dialog translated by someone and then i'm going to hex edit that in as well using good ole windhex or crystaltile.

neither of the three games i've put work on required any graphical hacking whatsoever, entire games were translate-able via text editing.

anyway sorry about that my real point is simply to emphasize the fact that by starting with just a hex editor and knowing _absolutely NOTHING_ about coding whatsoever these past few months have been great and i feel lucky that i started brute-forcing the game translations using nothing but windhex and CT2.

it forced me to learn a lot of stuff i never dreamed i'd be learning and it has been like learning a new language. man, the amount of times i had to start over work i'd done because even my backsup going back to two weeks all had the same hex editing mistakes and thus were unsuable... well it just forced me to learn more. right now i've just made the first tentative steps on starting a translation on elminage 2 and 3 for psp and these two games are the first ones that required image editing so... now i need to learn about image editing.

another psp game i'm doing a "everything-but-npc-dialog" translation on, also for psp, i'm struggling with learning how to hack its font into variable width or at least reduce its pixels as it doesn't support latin. it has taken me weeks but every day i make a little bit more progress and learn a little bit more of what i can do and what can't be done.

i guess my point is really that i disagree that newcomers should not start using only hex editors. instead i think it should be the opposite i tihnk everyone should start and do an entire game with nothing but text editing and then they will naturally be curious about all the other stuff they need to learn when they start running into obstacles (like what's happened to me).

now of course the thing is the 3 games i'm working on are all Wizardry-style dungeon crawlers that feature very little npc dialog. So i've never needed or even thought about needing to use anything else than a hex editor to do the script/dialog because while yes, there is SOME: i mena there ARE npcs after all, it's nothing that i can't bang out in 1 week or so. and also it forced me to get curious on learning about things like pointer tables, line breaks, etc. i've basically been going on trial-and-error.

i've gotten very curious about encoding and hexadecimal values and basically it's become very fulfilling learning about this stuff and i wouldn't feel this way if the person who first got me started on this stuff had told me what you guys are saying and shied me away from hex editing everytihng. you should tell them the opposite.

Klarth

  • Sr. Member
  • ****
  • Posts: 484
    • View Profile
Hex editors are an investigational / probing tool when it comes to romhacking. Anything beyond that and you're exposing your project to great risk.

it forced me to learn a lot of stuff i never dreamed i'd be learning and it has been like learning a new language. man, the amount of times i had to start over work i'd done because even my backsup going back to two weeks all had the same hex editing mistakes and thus were unsuable... well it just forced me to learn more.
It should have forced you to learn better project organization skills.

Quote
i guess my point is really that i disagree that newcomers should not start using only hex editors. instead i think it should be the opposite i tihnk everyone should start and do an entire game with nothing but text editing and then they will naturally be curious about all the other stuff they need to learn when they start running into obstacles (like what's happened to me).
Not everybody has to learn lessons the hard way.

Quote
i've gotten very curious about encoding and hexadecimal values and basically it's become very fulfilling learning about this stuff and i wouldn't feel this way if the person who first got me started on this stuff had told me what you guys are saying and shied me away from hex editing everytihng. you should tell them the opposite.
If you approach romhacking from a utilitarian standpoint, stay away from using hex editors as your means to modify "production" ROMs so you'll actually finish reasonably complex projects without the risk of huge setbacks. People who have been here since the beginning know too well about how many projects went belly up because of poor approaches.

If you approach romhacking from a puzzle solving standpoint, then go ahead and keep playing with the hex editor. It's fun to see what you can do with a limited, crude tool. But enjoy having to reshuffle an entire text bank and repointer it by hand due to a typo or script edit.

aweigh

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
i had been searching for the correct way to express my enjoyment of romhacking but you hit it right on the head!

that's exactly right: i look at hacking/translating a game as puzzle-solving! that is why i enjoy using the hex editor so much.

i differ with you about the relationship with tools and rate of project completion: i believe it depends entirely on the dedication and willingness to learn on the part of the people working on the project.

if you want to finish something... you finish it. if you don't... you don't. it is as simple as that friend :)

FAST6191

  • Hero Member
  • *****
  • Posts: 2621
    • View Profile
There are always some that will plough through but I have met just as many that really get into things after they have been given good tools or shown easier ways, or occasionally have something sorted for them so they can focus on something else.

Soldering -- I have seen people wander off thinking they are some kind of cack handed moron but I give them a go on my gear and they take to it.
Lock picking -- the tension wrench is all important here and cheapo Chinese tat sites tend not to give you good ones, not to mention most people apply far too much force. You handle that and give them a good tension wrench and once they get a feel for the raking and lifting they usually have the rest fall in line.
This could carry on for a while but I will leave it there for now.

They say a bad workman blames his tools, and maybe that is true at times. However a bad approach to tool selection and use really can make things a pain.

aweigh

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Well, i absolutely agree with that. I never meant to state that using a hex editor is the best tool; i think what i've been trying to communicate is that i think it's the most comprehensive one, and the one the most versatile, and the one most likely to engender curiosity for hexadecimal.

i find it odd that klath keeps referring to hex editors as "crude", and other demeaning adjectives. it's just a piece of software after all... and in any case, it would be the opposite of crude if you use logic. it can do anything.

i think more than lack of guidance on proper methodology and project planning what really might cause someone or a group of people to give up on a project is lack of flat-out explicit answers. i can count the amount of times i've been told to "WELL YOU NEED TO LEARN ASM GOOGLE IT" instead of any sort of real answer in probably the hundreds of times.

maybe someone else would get discouraged but that just forced me to keep trying, every day, googling new documents, reading forum posts, experimenting non-stop via trial and error, trying to understand little by little more about how "this stuff works".

hell look at my thread i posted about asking for suggestions on the best way to achieve VRW font on the game I'm working on on the side... 0 replies. Obviously everyone here has seen a thread topic similar to that one millions of times but the post has about 50 views, and i was extremely detailed in explaining everything and included screenshots and even offered 4 approaches that I think might work but need advice on how to go about them, i.e. it's not just random HOW DO I REPLACE FONT PLZ HLP post.

i post one thread with a slightly dramatic title and boom, immediate replies... make of that what you will.

FAST6191

  • Hero Member
  • *****
  • Posts: 2621
    • View Profile
Give me a drill, a hammer, a file and maybe a cold chisel and I will make you anything you like, it will probably take me 20 times as long and if you want the kind of finish or tolerances you get with proper modern tools then that only goes higher. They still rank as crude tools though and the same applies to hex editors. From your other topics you are drifting towards hex editors with extensive functionality bolted on, which is fine for if you are going to play with a hex editor then it makes sense to have a good one and practically speaking the difference involves downloading it. The trouble comes in that you are slowly reinventing either programming or something already done by more dedicated tools.
You spoke of junking work because you had a mistake caused at an early stage, that should never happen unless you made a fundamental error in figuring out the file format.

"engender curiosity for hexadecimal"
It is a numbering system useful for computers, or at least humans working in them. Other than maybe a quick extra for floating point/decimal points and signed numbers and there is really not a lot more that needs to be said or done. If you meant hex as shorthand for abstraction and data representation then maybe, I still prefer to teach it as a separate concept.

A lack of flat out explicit answers being a problem? It is not that folks here take some perverse delight in sitting there thinking "haha I know the exact answer to the question they seek, however I shall not answer, not even reply, and they will never know".
I should also say that your chosen game is for the PSP, not something a lot of people around here have the most experience in and though things do cross console barriers (anybody here probably can learn it, give or take some of the stuff involved with 3d coordinates and maths possibly being a bit new if you have only ever really done 2d and isometric) it still involves learning a new system, using the sub par debuggers that it has (PPSSPP is doing good stuff but it is somewhat recent and still not a patch on fceux, no$gba or PC debugging), downloading in this case you got lucky and it is only 130 meg iso (though that is still not a 4 meg SNES game and most that know the PSP see things routinely hover around the 1 gig mark) and then spending a few hours to figure out which of the dozen or so ways of doing that particular thing that a dev did.
Your one thread with the slightly dramatic title however can be answered quickly from memory by a large portion of the active forum users without so much as doing a single search.
Anyway back on the PSP then if I lack the desire to do the things in the list then I get to instead cover font representation as a whole and hope something is applicable. I do this in various replies from time to time, probably why I have a bit of a reputation for long winded replies, where I probably should have just said that will likely take you learning assembly so good luck with that. You might also be reading the wrong thing into such a reply -- most of the time I would read it as something like "I have this problem, is there are quick or existing way of sorting it or is it going to be a long winded affair?" and "yes mate, asm is in your future if continue down this path" is the way of saying yeah it is.

aweigh

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
The trouble comes in that you are slowly reinventing either programming or something already done by more dedicated tools.
You spoke of junking work because you had a mistake caused at an early stage, that should never happen unless you made a fundamental error in figuring out the file format.

Correct! I have never programmed or edited anything or even knew that you could "open an .exe" before a few months ago. No one is teaching my anything and the bits I have learned have been through trial and error and by reading guides, FAQs and forums. For example today I learned  the difference between sequential text and fixed length text strings.

Yesterday I learned the "hard way" that by spacing out (0x20) some strings I didn't like that it would cause the game to crash. Allow me to explain: in the three Wizardry Empire games (japanese) the developr 3 to 5 %s (operators? commands? strings? I do not even know what they are called. I used to think they represented percentages, and that %d represented a dice roll!)-- 3 to 5 of these:

%s"JapaneseCharacterMeaningITorTHE"%, and the others are usually words like "BODY" (for when a character uses the HIDE command); and the like. However the problem is that since they always get called during a lot of actions sometimes they won't "match" the translation of the ACTION itself. I was seeing stuff like "aweigh THE received damage!". See the problem? So when I translated Wizardry Empire 1 I "solved" this problem by replacing each of those variables with %s"8145"% which is a cute little square. So now during that example it would read: "aweigh * received damage!". It is the best possible solution I can think of because you can't name that variable to "awiegh HAS..." because it is also utilized by 20 other actions that won't FIT NATURALLY with the word HAS. Using a simple square looked nice and problem solved.

Yesterday while translating Wizardry Empire 3 (Three) I did the same thing with its battle strings but 8145 caused the game to crash. Now I need to find something else to use there. My whole point with this example is to let you know that you are correct: I have no idea what I'm doing. I absolutely learning this as I go and am getting better every day. I did not even know about "invisible" characters until I spent hours one day, weeks ago, translating via hex editor the NPC dialog of a character in Wizardry Empire 1 and when I went to go check it out in-game all of his dialog boxes were empty. It turned out the period at the end of his sentences, 8142 which is the FW kana period, was a substring (is that the correct term?) that when erased affected the hex value immediately following, 5C, the slash sign, which then in turn affected the lower-case "n". Boy was there egg on my face.

I was SHOCKED that there could be invisible characters! That there was stuff I wasn't seeing! Instead of being dismayed I kept learning.

"engender curiosity for hexadecimal"
It is a numbering system useful for computers, or at least humans working in them. Other than maybe a quick extra for floating point/decimal points and signed numbers and there is really not a lot more that needs to be said or done. If you meant hex as shorthand for abstraction and data representation then maybe, I still prefer to teach it as a separate concept.

I think it's incredibly exciting and fun to learn. A few days ago I spent a whole day building several tables just for fun and for practice. I love reading websites that detail what controlling characters are, what line-breaks are, hell I've even spent hours reading the history of the evolution of the encoding systems. It allowed me to translate Wizardry Empire 1, and it is allowing me to translate 3 other games; it also allows me to edit save states and it also allows me to the OPPORTUNITY to learn. I have never been interested in any programming language but this has become a gateway and now I plan to learn many others.

Did I mention that I used to think %d represented a to-hit dice roll? :)

A lack of flat out explicit answers being a problem? It is not that folks here take some perverse delight in sitting there thinking "haha I know the exact answer to the question they seek, however I shall not answer, not even reply, and they will never know".
I should also say that your chosen game is for the PSP, not something a lot of people around here have the most experience in and though things do cross console barriers (anybody here probably can learn it, give or take some of the stuff involved with 3d coordinates and maths possibly being a bit new if you have only ever really done 2d and isometric) it still involves learning a new system, using the sub par debuggers that it has (PPSSPP is doing good stuff but it is somewhat recent and still not a patch on fceux, no$gba or PC debugging), downloading in this case you got lucky and it is only 130 meg iso (though that is still not a 4 meg SNES game and most that know the PSP see things routinely hover around the 1 gig mark) and then spending a few hours to figure out which of the dozen or so ways of doing that particular thing that a dev did.

Working PSP games is an absolute nightmare. Wizardry Empire 1 I did the Windows PC version and it was paradise compared to what I'm going through working on Elminage 2, 3 and on Wizardry Empire 3 for PSP. Also: I fucking love it. Know why?

I didn't even know what debugging was until 2 weeks ago. Sure I knew what it was in a general sense, and in the literary definition of the word; but I didn't know absolutely ANYTHING WHAT-SO-EVER about things like: viewing hexadecimal data in memory; inspecting and "fixing" ASM functions/code, and of course I had never before extracted textures from a game. Because of all the obstacles the PSP games presented me... starting with the fact that the .BIN files are impossible to extract shit from, that is of course until I FORCED MYSELF TO LEARN HOW TO DO IT, and hell also the fact that I didn't even know that games came encrypted!

I spent at least a good 3-4 days trying to "troubleshoot" why my game-edits were not showing up in-game... imagine my surprise when I learn that I have to do this thing called decrypting the EBOOT.BIN. Oh, and you know what else? Thanks to that experience I was also forced to learn about headers! I didn't know what headers were, or what headers are used for even until I had to decrpy some .BIN files. Are you starting to understand my point about how jumping in blindly and with enough enthusiasm and the right attitude you can always keep learning and improving?

Now I am using programs like Cheat Engine to locate strings, functions, calls; to view the hexadecimal data in memory; etc. I LOOOOOVE doing stuff like that. And again, it was only due to the unbelievably problematic nature of PSP game hacking that I had to learn how to trace and how to dump and what the fuck a freaking break-point even is. I distinctly remember a GBATemp poster telling me to "set a breakpoint and trace where the text is being pulled from". Now, do you think that helped me? It did, but not in the way he intended. It helped me in the sense that I thought: Well since absolutely nobody wants to explain anything I'll have to do it myself. And there is merit to this!

But there is also merit in sharing as much as humanly possible _just because you CAN_. Not everyone is as enthusiastic as me.

And besides: how else am I supposed to learn ANY of this stuff? The guides on any site, be it here or on GBATemp are either flat-out subpar or they only cover stuff detailing NES/SNES games. THAT IS COMPLETELY USELESS TO ME. PSP games do not deal with lo-rom and hi-rom stuff. I sure do wish there was a guide on PC GAME headers or what is the best way to create an entirely new font width table and insert it into a PC or a PSP game! Unfortuantely I havne't found any detailed ones so far; but I devote some hours every day to learning more until eventually I'll know what to do and how to do it.

Guess what? Today I actually expanded the Wizardry Empire 3 EBOOT.BIN successfully and added 3000 bytes. I did this because I know I'm going to need space for when I insert the ASM code that changes the game's font to 8 pixels. Do I know ASM? No. Will I know what I need to know to do what I want in a few weeks? I guarantee it. Now to be fair this is the very first time one of the many "tutorials" I read actually detailed everything perfectly concerning what expanding was and how to handle the headers and whether to add new spaece or to extend, etc. Everything I just mentioned... 100% new to me, learned it today, loved doing it, and I feel awesome that it is done using a hex editor!

Your one thread with the slightly dramatic title however can be answered quickly from memory by a large portion of the active forum users without so much as doing a single search.
Anyway back on the PSP then if I lack the desire to do the things in the list then I get to instead cover font representation as a whole and hope something is applicable. I do this in various replies from time to time, probably why I have a bit of a reputation for long winded replies, where I probably should have just said that will likely take you learning assembly so good luck with that. You might also be reading the wrong thing into such a reply -- most of the time I would read it as something like "I have this problem, is there are quick or existing way of sorting it or is it going to be a long winded affair?" and "yes mate, asm is in your future if continue down this path" is the way of saying yeah it is.

I completely agree mate and I love long posts too. I mainly post at the rpgcodex and I treat forums as verite communque: you should write about your stuff as detailed as humanly possible and provide even perhaps what some would call unnecessary extrapolation. A long post that contains actual communication is rare and should be prized.

I detest people who say "lol tldr".

http://s7.photobucket.com/user/aweigh01/library/

Feel free to peruse my photos as they are all specifically about the Wizardry games (and others) I've been working on. If you go back to the very first photos you can look at the in progression and see the actual "learning" thing I've mentioned a few times. Also I feel very proud :)

The entire reason I even started hex editing files is because I am probably the biggest Wizardry fanatic you'll ever meet. And when I ran out of Western-developed Wizardry games and got tired of pining hopelessly for the JP Wizardry games to get localized I simply decided that I would translate them myself. Why? Because I want to play the games myself. For literally no other reason. Although I will release I could not possibly care less who else plays whatever I work on. I'm doing this because these are games I want to play in english myself and enjoy them. If it means learning 10 different things that will probably have me screwing up over and over until I "get it right" then great, and if it so happens I've found out I massively enjoy editing hexes then don't you think that's a good thing and something worth being enthusiastic about? I do.

I update the thread ( http://www.rpgcodex.net/forums/index.php?threads/all-in-1-thread-about-wizardry-clone-translations-right-here-new-info-been-working-on-wiz-xth-2.108462/ daily even though almost no one replies because not only does it serve as a way to arouse discussion in that forum (it's an RPG forum but there is a surprising amonut of dedicated rom hackers there who post regularly, and it was one of them who got me started) and to be honest: that thread made in a non-rom hacking website has yielded a lot more education for me concerning hacking, debugging, extracting files and graphics editing and all that good stuff than any romhacking forum has so far.

One person even explained to me step by step how to find the value that dictated the FW_FONT's "FW_WIDTH" value when I was doing the grunt work on Wizardry Empire 1: he went step by step and in the end I learned that surprisingly enough, the Microsoft website has a ton of information that is very useful for rom hacking! Needless to say I immediately changed that game's default FW_WIDTH value from its default "500" (8403 hex value) to a cool, slim and skinny and beautiful looking 2C01.

I had no idea how to "write" the number 300 for the value I wanted instead of 500 so... once again, guess what? I had to learn via googling and look up hexadecimal FAQs/websites until I learned alllll about a lot of stuff that went way beyond how to write 100 in hex. One problem once again leads to completely new avenues and they are ALL very interesting!

Do you honestly think that would have happened to me by making a post about the font being too bulky in a hacking site? Be honest with yourself... you know the answer is no.
« Last Edit: May 02, 2016, 11:36:02 am by aweigh »

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
aweigh, while I don't really agree with the feelings you express here (in particular being told you can set a breakpoint and go back to text from there is an interesting hint for someone with basic programming knowledge, so sorry if you don't have that yet, wecan'talways know wherepeople are starting from), I'd like to mention, since you're talking PSP, for your ASM changes, I'd recommend using armips.
It may not sound impressively great at first (I've been that route) but armips allows you to write your new instructions in a text file in "readable" text, and compile them whileloading the existing BOOT.bin.
It's helped me with Super Robot Wars A Portable.

Good luck with the PSP. I think it's not as complex as Fast expressed (well I guess he can handle it ok, it's just that a lot of people have been used to older systems, and once you've taken a couple of years or more on a system, intellectual laziness kicks in - ormaybe it's a bit of boredom, I don't know;D). ppsspp rocks to my ears and the development team is still adding stuff weekly and is open to code contributions, too.

aweigh

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
MAJOR update! I've been getting my feet wet learning about how ASM is "understood", and how you can use it and what you need to do beforehand... and anyway as an experiment I decided I wanted to track down the function that sets the Pixel size of the Wizardry Empire 1 (One) font, even though the game doesn't really need it as it has full latin-ascii support and ample text-length; but the point was to practice on a game I know literally inside and out before moving on to ASM'ing half-size pixel font on the 3rd Empire game on PSP.

Long story short: success!





!!!

Now I just need to buckle down and start hunting dowm the same shit I just spent half the day figuring out but on the third game on PSP. Should be fun! Especially since Wiz-Emp-3 does not use GDI32.DLL as the backend for it's font. It's going to be much harder to find. But I will. And once I do...

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Forgot to mention, likely these "%s" "%d" and such are format strings used typically with the printf function. I guess you already figured that out, anyway.

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Let me blow your mind: look up a tool called IDA Pro. It's far better than the disassembler in CE.

VicVergil

  • Hero Member
  • *****
  • Posts: 716
    • View Profile
Let me blow your mind: look up a tool called IDA Pro. It's far better than the disassembler in CE.

What's the best version for PC/emulated PSP/PS1/PS2/GC/DS/SNES disassembly and memory editing kind of like Cheat Engine does?
Are there any tutorials for how to hook it to a PC game and/or an emulator and get it to work?

FAST6191

  • Hero Member
  • *****
  • Posts: 2621
    • View Profile
Disassembly, assuming you do not want static*, for emulated things is probably whatever emulator is the debugger for that console. It might be the case that the process attaching programs (emuhaste, artmoney and that one there, emuhaste being free and surprisingly good if you can get past the UI stylings -- if you have ever seen Japanese takes on western culture and raised and eyebrow then this is that but for 90's hacker style programs) are better for memory searching and cheat making/application though. I have not seen such a program provide a disassembler I can call better than the emulator provided one though. I should confess however that I am not as familiar with Cheat Engine as I probably should be.

*you can still feed a static disassembler a memory dump, and in doing so dodge compression, encryption, some obfuscation, runtime loads and runtime changes and more besides.

PC wise you immediately get bogged down in theory of operation of programs (leaving aside interpreted stuff then you almost immediately have to cover executable packing, let alone dealing with dynamic memory allocation or stuff like ASLR), operation of operating systems (prior to what the xbox everything in games was basically operating with full control over the hardware and no backup/help beyond maybe a few BIOS or firmware functions), languages (decompilers are more than a theoretical thing or toy for Java, C#/.net family and even a bit of plain C these days and that accounts for an awful lot), to say nothing of dodging a disassembly session by playing with stuff like http://www.nirsoft.net/utils/opened_files_view.html http://www.nirsoft.net/utils/process_activity_view.html and even a humble dll export viewer http://www.nirsoft.net/utils/dll_export_viewer.html (function names are pretty useful). Also wow I still fail to appreciate how much good stuff nirsoft has for nice toys like this.
IDA is rightly considered the top top program for this sort of thing out there now. However if you already know a debugger for something else and it will attach to random programs, most will so you can still debug production binaries -- nothing will sink your programming setup faster if people can't sort a race condition that reared its head after you took debug flags/routines out, then you can use that. IDA's workflow is not geared so much towards simple memory manipulations like we want for cheats (most people playing with IDA want to know/alter program flow, figure out data structures or occasionally find something hidden) but it can certainly do it.
IDA has a free version that does pretty well for PCs. http://radare.org/r/ is probably the best answer I have seen from the open source world.
The my first debugger stuff most people encounter is http://www.ollydbg.de/ (there is even a version floating around the downloads here if memory serves). It is however one of the casualties of the shift to X64.

There are two main people that use debugging tools outside of actual development and they are game fiddling types and anti virus people, both of which are frequently frustrated by the original devs as they do not want people pulling their code apart. I prefer the tutorials from the latter -- the game people do well (find anything you like from big hacker conferences https://www.youtube.com/user/ChRiStIaAn008 dealing with games and it will probably be good) but for as strangely as we around here sometimes have to look at those working in game specific circles then it is worse there.

Oh and if you feel really fancy then you can slap a virtual machine quite hard these days and get it to spit out all sorts of good stuff. Virus writers know this and try to play accordingly but I am not seeing much from game devs here, and with the rise of decent virtualisation that will speak to 3d cards I am not sure they will. I have not even touched network and database programming and I am probably not going to.