ROM Hack How do I create an ips patch (or other types of patches supported by GBA)?

ImAStalker

Member
OP
Newcomer
Joined
Apr 1, 2016
Messages
22
Trophies
0
Age
21
XP
136
Country
United States
(I'm very very new to this so bear with me) I want to know how I can make an ips patch for GBA using tools found on Android devices. What tools do I need? What kind of code is needed? Where do I even start? If someone could tell me this information, I would greatly appreciate it.
 

corniander

Member
Newcomer
Joined
Aug 13, 2017
Messages
6
Trophies
0
XP
65
Country
United States
What's your end goal? There may be another method to do what you're trying to achieve.

As far as IPS patches, as I understand it the IPS patch is basically a way to make rom edits portable. In other words, you would hex edit the original rom, then use a utility like LunarIPS (LIPS) to generate an IPS patch by loading the original and modified rom. You could then share the patch, and others could use LIPS to apply the patch to their rom.

Other tools that you might find useful:
GBA Auto Trainer Maker (GBAATM) - patches codebreaker format codes to GBA roms: https://filetrip.net/gba-downloads/...baatm-1-9-9-7-0-0-1-1-9-9-7-0-0-1-f33297.html
AR Crypt - converting cheat code formats: http://www.codemasters-project.net/portal-english/apportal/download.php?view.24
 

ImAStalker

Member
OP
Newcomer
Joined
Apr 1, 2016
Messages
22
Trophies
0
Age
21
XP
136
Country
United States
What's your end goal? There may be another method to do what you're trying to achieve.

As far as IPS patches, as I understand it the IPS patch is basically a way to make rom edits portable. In other words, you would hex edit the original rom, then use a utility like LunarIPS (LIPS) to generate an IPS patch by loading the original and modified rom. You could then share the patch, and others could use LIPS to apply the patch to their rom.

Other tools that you might find useful:
GBA Auto Trainer Maker (GBAATM) - patches codebreaker format codes to GBA roms: https://filetrip.net/gba-downloads/...baatm-1-9-9-7-0-0-1-1-9-9-7-0-0-1-f33297.html
AR Crypt - converting cheat code formats: http://www.codemasters-project.net/portal-english/apportal/download.php?view.24

My end goal is to try to translate Densetsu no Stafy 2 into English. I mainly use an Android device so I need tools I can use on Android. Nothing on PC or Mac please. As for hex editing, I was going to learn about hex editing through romhacking.com's tutorial about it, but the download link to the PDF was broken.
 

corniander

Member
Newcomer
Joined
Aug 13, 2017
Messages
6
Trophies
0
XP
65
Country
United States
I think all you'd need is a hex editor like https://play.google.com/store/apps/details?id=com.myprog.hexedit&hl=en

The major challenge is going to be locating, extracting, translating, and re-inserting the text. It might be a steep technical challenge to try to get it all done on android. That said, you might be able to find someone that will extract all the text/scripts in the file, you perform the translation, and they insert the translated text.

Users like Pablitox, FAST6191, etc. would have much more insightful feedback
https://gbatemp.net/threads/how-do-i-translate-gba-roms.473916/
https://gbatemp.net/threads/summon-night-swordcraft-story-beginnings-stone.389972/
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
For the most part you are going to want a Windows machine. Nothing else really has the tools, and definitely not android. Theoretically you could make some of the more basic ones (something to handle tables, something to act as a tile editor, maybe a basic memory scanner for an emulator). You don't need a good PC though and a core2 era refurb laptop will do you stunningly.

http://gbatemp.net/threads/gbatemp-rom-hacking-documentation-project-new-2016-edition-out.73394/ has a bit more on the various techniques and how they work.

IPS is just a patching format with no special abilities (and not one the GBA has any particular knowledge of, though some emulators do support it); asking to make one of those for what you want to do is like asking to make a word document when you want to write a story.

Hex editors are dumb and very basic tools. Nobody uses them beyond initial scanning, minor fixes and minor fiddling. If it looks like a hacker is doing a lot with one it is only because they are doing a lot in their head or outside the hex editor to make it happen.
 

ImAStalker

Member
OP
Newcomer
Joined
Apr 1, 2016
Messages
22
Trophies
0
Age
21
XP
136
Country
United States
For the most part you are going to want a Windows machine. Nothing else really has the tools, and definitely not android. Theoretically you could make some of the more basic ones (something to handle tables, something to act as a tile editor, maybe a basic memory scanner for an emulator). You don't need a good PC though and a core2 era refurb laptop will do you stunningly.

http://gbatemp.net/threads/gbatemp-rom-hacking-documentation-project-new-2016-edition-out.73394/ has a bit more on the various techniques and how they work.

IPS is just a patching format with no special abilities (and not one the GBA has any particular knowledge of, though some emulators do support it); asking to make one of those for what you want to do is like asking to make a word document when you want to write a story.

Hex editors are dumb and very basic tools. Nobody uses them beyond initial scanning, minor fixes and minor fiddling. If it looks like a hacker is doing a lot with one it is only because they are doing a lot in their head or outside the hex editor to make it happen.

A tile editor? Isn't that for graphics? I'm trying to edit text. Also, I did try to read your document and I had no idea where to start, neither in reading nor in actually translasting the game. I'm also still unsure as to how I'm going to dump files from the ROM, or at the very least figure out which hex values correspond to the game's text and which hexadecimal values correspond to which characters. Also, what do you say are the disadvantages of IPS? I saw a fan translation of Densetsu no Stafy (the first one) that used IPS.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
GBA games have no individual files like the DS and optical media based systems. It is all in one and you get to pick it apart, and crowbar it back in later. Said crowbarring is usually not as hard as older systems as most games have oodles of space you can use.

A tile editor is good if you have to edit the font, if there is text as imagery (anything even vaguely fancy probably comes as an image rather than text, especially on lower text games like puzzle games and platformers), finding the font can also help make tables (it can give you orders of encodings, options for tracing sessions, elimination (if ? to ? is all the sprites for the game it is not going to be the text and you can skip checking that section for text) and more besides.
That said I had a quick scan of

8:59 has something which might be graphics, 11:47 too (and it appears to come up often enough), 22:45 almost certainly is (whether you want to translate it is a different matter) the UI elements might graphics (or at least a special entry as part of the font)

35:42 might have some things,

most of the text is likely just text, though the different colours might mean you have some markup to deal with (if you have every done HTML or manually made something bold on a forum or something then can be like that, except usually using binary instead)

IPS. Disadvantages. It is in place (any bit which is different will be detected as a change, where it might be just something shuffled forward or backwards a bit, or it might be compression you have decompressed and recompressed after your edits), though this is not so bad for the GBA but is fatal for the DS and said things with file systems.
It is pretty much limited to 16 megabytes. GBA games go to 32, though most are 16 or under and most people don't need to tap into the last 16 megs for their hacks.
It has no verification of the input file. Someone can then feed it a different version than what it expects and you get a "it does not work" post when it is their fault. Not a major problem on the GBA but on something like the SNES with dumper added headers it is a nightmare.
It has no verification of itself. If the patch is corrupted it will patch away quite happily and you are back to the "it does not work" posts.
It struggles to create data. Hard if you are expanding the ROM.
There is no one version of IPS. It was made by nobody knows actually and many have extended things over the years. For the most part this is a non issue as a basic patch should work on all, however some patch maker programs make odd things which other programs in turn struggle with.

It sort of just about works for the GBA but fails horribly after that. Rather than having a bunch of different formats though ( https://xkcd.com/927/ is so very true) many have taken to discouraging IPS' use wherever it can be in favour of something better.

I would not really trouble yourself with considering the merits of IPS at this stage though.

As for the document I did try to make sections and titles for the various things. The sections should be able to be read standalone and the introduction is there mostly to get you started with some of the concepts to follow.

As for figuring out what hex represents what I cover a bit of it, Japanese does not work for some of the easier methods that hackers delving into games using Roman character set type languages have but it is still quite possible.
 
  • Like
Reactions: corniander

ImAStalker

Member
OP
Newcomer
Joined
Apr 1, 2016
Messages
22
Trophies
0
Age
21
XP
136
Country
United States
GBA games have no individual files like the DS and optical media based systems. It is all in one and you get to pick it apart, and crowbar it back in later. Said crowbarring is usually not as hard as older systems as most games have oodles of space you can use.

A tile editor is good if you have to edit the font, if there is text as imagery (anything even vaguely fancy probably comes as an image rather than text, especially on lower text games like puzzle games and platformers), finding the font can also help make tables (it can give you orders of encodings, options for tracing sessions, elimination (if ? to ? is all the sprites for the game it is not going to be the text and you can skip checking that section for text) and more besides.
That said I had a quick scan of

8:59 has something which might be graphics, 11:47 too (and it appears to come up often enough), 22:45 almost certainly is (whether you want to translate it is a different matter) the UI elements might graphics (or at least a special entry as part of the font)

35:42 might have some things,

most of the text is likely just text, though the different colours might mean you have some markup to deal with (if you have every done HTML or manually made something bold on a forum or something then can be like that, except usually using binary instead)

IPS. Disadvantages. It is in place (any bit which is different will be detected as a change, where it might be just something shuffled forward or backwards a bit, or it might be compression you have decompressed and recompressed after your edits), though this is not so bad for the GBA but is fatal for the DS and said things with file systems.
It is pretty much limited to 16 megabytes. GBA games go to 32, though most are 16 or under and most people don't need to tap into the last 16 megs for their hacks.
It has no verification of the input file. Someone can then feed it a different version than what it expects and you get a "it does not work" post when it is their fault. Not a major problem on the GBA but on something like the SNES with dumper added headers it is a nightmare.
It has no verification of itself. If the patch is corrupted it will patch away quite happily and you are back to the "it does not work" posts.
It struggles to create data. Hard if you are expanding the ROM.
There is no one version of IPS. It was made by nobody knows actually and many have extended things over the years. For the most part this is a non issue as a basic patch should work on all, however some patch maker programs make odd things which other programs in turn struggle with.

It sort of just about works for the GBA but fails horribly after that. Rather than having a bunch of different formats though ( https://xkcd.com/927/ is so very true) many have taken to discouraging IPS' use wherever it can be in favour of something better.

I would not really trouble yourself with considering the merits of IPS at this stage though.

As for the document I did try to make sections and titles for the various things. The sections should be able to be read standalone and the introduction is there mostly to get you started with some of the concepts to follow.

As for figuring out what hex represents what I cover a bit of it, Japanese does not work for some of the easier methods that hackers delving into games using Roman character set type languages have but it is still quite possible.


Thank you, that helped quite a lot.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: Thank You :D