11 March 2016 - Forum Rules

Main Menu

Move the hex code to another position in the hex editor

Started by ballony, November 30, 2021, 04:10:04 AM

Previous topic - Next topic



I have a question about changing a hex code of a text message that starts at 03C93790 column 00, and goes to 03C937E0 column 0B. I want to move this code of this text message to 03C9E900 so that the text starts there. I am translating a hack into another language, and where the text is now is not enough space for the complete translation. I would have to accept cuts. Can someone help me further!? How do I have to do this?!


Sounds like you are going to have to learn about pointers.

Games by and large don't have time to parse the ROM to find the text like the web browser we are communicating on or documents you might write as it takes valuable CPU resources, and usually text does not change between boots Read Only Memory after all) so even worse to waste it. To this end they have pointers which are lists of locations (memory level, ROM level, file level... it depends what system, game and setup you are using, and can vary within the game, and there are multiple approaches to doing pointers but I will leave that for a moment) of places where text is at. Older systems might well do it line by line with the pointers serving to mark end of line, later ones might do section by section or screen by screen.

If we knew what system and what game that might help some more but still going to have to learn about pointers.


I do not know how this works with the pointers. Would be glad if you could help me. The game I am working on is a Super Mario 64 hack.


For Mario64 most will probably tell you to go look at the source code and recompile that these days. That will sort many things out almost automatically and possibly reduce any text editing efforts to it actually being harder to edit a post here.

Anyway the N64 did not have a file system (a means to have the big ROM break down into component files, think like a CD based game) so we are back to ROM level and RAM level efforts depending upon what the devs did.

ROM level is much as it sounds and is mostly finding values that count from the start of the ROM (or some fixed point) and where the text is.
RAM level will take where the ROM appears in RAM (for any console this is rarely starting at 00 and instead will be somewhere else in the main system memory, possibly even split up to allow it to do things -- see bankswitching on older consoles).
Most look immediately before or after the text in question as a lot of the times the pointers are there. Otherwise you are looking for values that correspond to locations in ROM/RAM for the text as these will tend to be the pointer.
There are further things that make pointers sometimes more annoying -- text formatting can be included in them, and the are the various ideas of how pointers can be used within programming -- above the thing where I said start at the start of the ROM and count from there is standard pointers, offset pointers is when you start somewhere else (usually the start of the text section) and you have relative (adding the value of the pointer to the current location is sometimes done for various programming related reasons).

You might also find something in might do something more but I am not seeing things for text.