How to convert this to a Codebreaker Code?

gukingofheart

Well-Known Member
OP
Member
Joined
Feb 2, 2022
Messages
235
Trophies
0
Age
124
XP
443
Country
United States
I debugged "030042BC"
And this is what popped up in the debugger

1691471950743.png


I changed 08069D64 8008 to 08069D64 8808 & that worked for the HEX editor.. but a little confused on making it a code breaker code.
80069D64 8808 is my WRONG codebreaker code, as it did not work!
 

TechieSaru

Well-Known Member
Newcomer
Joined
Mar 2, 2022
Messages
72
Trophies
0
Location
Somewhere, Out there
XP
842
Country
United States
Hey there! Codes that modify the ROM can not be used in code breaker (8:4) format. They must be in either of the following two formats:

Code:
GameShark V2
6aaaaaaa 0000vvvv

GameShark V3
00000000 18aaaaaa
0000vvvv 00000000

Note: GS V3 has four rom code slots: 18 (Shown above), 1A, 1C, and 1E

aaaaaaa - Address / 2
vvvv - Value written to above address
 

gukingofheart

Well-Known Member
OP
Member
Joined
Feb 2, 2022
Messages
235
Trophies
0
Age
124
XP
443
Country
United States
I tried Gameshark V2 but my results are wrong in some way.

08069D64 8808 (the code I'm trying to debug) DIVDED BY 2 EQUALS 4034EB2 8808

Changed to this..
4034EB2 00008808

then I added a 6, like this.

64034EB2 00008808

I goofed somewhere. Which is the correct format exactly.. so I can narrow down the error?

UPDATE: Confused on the format, so, hoping to get more help here...
I now realize, that the code will fail, because it uses "08069D64" for other things, so I'll also have to use a different game.

Question: for GS V3, can I use 18, 1A, 1C, 1E like a choice.. or do certain codes require certain ones?
 
Last edited by gukingofheart,

TechieSaru

Well-Known Member
Newcomer
Joined
Mar 2, 2022
Messages
72
Trophies
0
Location
Somewhere, Out there
XP
842
Country
United States
I tried Gameshark V2 but my results are wrong in some way.

08069D64 8808 (the code I'm trying to debug) DIVDED BY 2 EQUALS 4034EB2 8808

Changed to this..
4034EB2 00008808

then I added a 6, like this.

64034EB2 00008808

I goofed somewhere. Which is the correct format exactly.. so I can narrow down the error?

Question: for GS V3, can I use 18, 1A, 1C, 1E like a choice.. or do certain codes require certain ones?

It should be 69D64 / 2. When doing the calculation make sure to drop the "08" in front of the address.
The correct code is: 60034EB2 00008808
 

gukingofheart

Well-Known Member
OP
Member
Joined
Feb 2, 2022
Messages
235
Trophies
0
Age
124
XP
443
Country
United States
Can Gameshark V2 change any OP codes... or does it not work like this?
Experimenting with different games, and getting weird outcomes.

When to use a 6, and when to use a 1, for gameshark v2?
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,405
Country
United Kingdom
Many would seek to avoid using ROM area cheats if they can, or just patch the ROM directly (assuming flash cart or emulator for final uses). ROM cheats tending to be more reserved for master codes and such (why there is usually a sharply limited amount of them) and the game genie approach to life then being a distant memory (at least until whole binaries started being shoved in memory on the DS and beyond).
For the sake of some links
https://doc.kodewerx.org/hacking_gba.html
https://problemkaputt.de/gbatek.htm#gbacheatdevices

Are you sure you need such potency as well? Most of the GBA cheat engines happily support conditional cheats and a one line alteration like that is usually just a snappy way of doing something that might take 3 in a RAM one, or a way of converting it to a ROM hack rather than a cheat. Similarly while the cheat area is not on the screenshot above I am going to guess it is not one of those things that lives on the stack.
 
  • Like
Reactions: SylverReZ

gukingofheart

Well-Known Member
OP
Member
Joined
Feb 2, 2022
Messages
235
Trophies
0
Age
124
XP
443
Country
United States
083DBDCC:E1CB7CB2 < You saying these types of cheats are good enough of a format? So far, I had better luck stopping here for some of the codes.

I'm just wanting to learn all options, so I can pick and choose different methods, for different types of codes.


edit: Oh, after clicking the link. I get what you mean by rom patch.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,405
Country
United Kingdom
Classically cheats are divided between RAM type (gameshark, action replay, codebreaker, goldfinger if you move in Chinese circles...), ROM type (game genie, though some call them assembly cheats these days) and save type, plus maybe trainers. I will ignore saves and trainers for this.

Traditionally the games ran from the cartridges themselves and had non code data in the RAM. Easy enough to change this RAM hence most things being this.
The game genie devices sat between the console and the cart and could intercept reads to the cartridge to replace it with whatever you like. This means both code and data (graphics, levels, pointers, text, music... all a read after all) but increased difficulty as you have to know what you are changing compared to the easily changed by play RAM.

Technically the GBA can run things from RAM. It mostly coming in the form of the games having one small bit of code loaded into RAM to be executed that little bit faster. Normally going to be a loop that needs to be super tight as the cartridges themselves are pretty fast (one reason for expensive flash carts). Oh and multiboot things delivered by the link cable port (be it multiplayer things or gamecube link up) of course but most people don't care to cheat in those (have enough emulators or flash carts to do the deed and you might as well run the whole thing and cheat on that).
Later systems (the DS) and anything that runs from an optical drive or floppy drive tends to copy things to RAM owing to speed concerns so RAM cheats there can find the binary (or data when loaded in) and edit things to similar levels of potency you might have seen in the game genies of old.

The GBA is also new enough that you have proper conditional cheats rather than hoping there is a button on the cartridge you can press (though there are a few of those as well). That is to say compare and if less than/greater than/in range/equal to then do this, signed and unsigned options available and easy enough to also check what buttons are pressed as the button states are in RAM (or debounced into it if you are better still). Plus even a limited amount of operational abilities within the cheat engine, not quite as nice as some later things where you have addition, subtraction, boolean logic (you do have AND options at least in one of them), shifts and such but a few things.

Most then start by learning the boring and basic infinite life, potions, ammo type deal where you start the search, change the thing you care about (and as little else), search for changes (or maybe even specific values), change it again, search, maybe don't change and search for things that stayed the same to hopefully eliminate some background timers or something that is always changing otherwise until you find the thing you want.
The sort of thing covered in https://web.archive.org/web/20080309104350/http://etk.scener.org/?op=tutorial
Some will find flags as well, usually by doing savestates and comparing before and after but you can hold finger on the turbo button of the emulator until the flag wears off if you like (hopefully it is time based rather than step counter or only timer when moving, not that moving is hard to do). This typically giving no random battles type cheats as there is bound to be a pickup or a potion, maybe a cutscene/tutorial effect, with the effect you can trip into being active with a cheat.
Said flags might also be whether a character is poisoned, paralysed, burned, immune to water...
Oh and it is usually going to be a flag to make moon jump cheats where a game has a double jump (always hold the has double jumped as negative and off to the moon you go). Others might make a jump stat ridiculous or find some kind of gravity variable.

People might also learn to be more effective in cheat searching -- luck might rise by 1 every 5 levels or even not at all and not be changed by any pickups (or pickups counted separately) so might be easier to find defence and it will either be in the same run of data (player 1 atk, def, con, int, lck, player 2 atk, def, con...) or probably just after it (all players atk, all players def, all players con, all players int... and finally all the party luck values), that or make an experience cheat and set it to 1 below next level and keep doing that.
Items also have similar shortcuts. The GBA tends not to have crazy XML defined weapons like a modern MMO or something with random loot and any number of attributes so you either have a big table where each location corresponds to the amount of that thing you have (in such a case you will tend to have no inventory limit) or be an indicator value and the amount of said same you have (quite often seeing a limit on the number of items you can have in your inventory, key items tending not to be this but instead a separate table like the former approach). Give yourself infinite money and buy many first shop steel daggers or whatever basic first weapon is and you learn the location. Will soon know if it is location or indicator-value and thus can experiment with other values and locations to get things you might only get one of in a game, or be hidden developer items locked from the final game, or be bonus quirky side weapons that might need to be discovered through very hard sidequests and hidden bonuses.
Minor variation on that for force playing as certain characters (bonus, hidden, unlocked, boss...) where the value of the character is selected (either when you hover over it, confirm the selection or maybe everybody confirms their selection) but being a mighty cheat maker you can put whatever you like in. It can also be if the game determines the next random battle ahead of time you can put what characters you like in to make fight certain pokemon (also dodging annoyance of having to construct a whole pokemon with all the stats that might even be unique to the specific player in wherever it is stored in the inventory).

Combine all that with the option to make a button combo do something and you can also dodge many pitfalls -- if infinite health means you can't lose a must lose battle in a RPG story then button combo to refill, button combo to turn on or off (if there is not such a thing baked into the setup itself you might find a free bit of memory to write to and then do if this is 1 then infinite health, if this is 0 then off), maybe change enemy atk to nothing for several slots, make player def sill high... many choices here and some even better than boring hold this value (which could remove the challenge where refill is optional and might still see you vulnerable to some things).

That then does what most people expect when they go searching for this style of cheat (and it certainly has some profound effects upon the gameplay, in both the make it easy and usually with a bit of tweaking make it hard**), and with enough workarounds to dodge any gameplay traps and probably most code ones (if the value is in RAM but left on the stack for a while and used there, only written to RAM long after the damage calculated, has no health and thus is dead check has happened).

**easy enough to make an infinite life cheat check for if greater than then set to enough health that next hit will kill you, or if max health is its own separate stat then tickle that, or cap the number of potions you can carry, or in the case of sonic set rings to 0 so next hit kills you, or set timers such that you have to move it, or set enemy HP back up to full just the once (recall the tripping a flag elsewhere in the ROM) to effectively double their HP (assuming you can't just find the stat it copied into RAM).

After this people do start looking to assembly, or indeed might approach it from the start for something they suspect to be more difficult or find with some kind of anti cheat (had a final fantasy game once that decoupled on screen hp from in game, however the assembly hacker does not care as the same series of code that updates the screen will necessarily have happened along with/because of the other). That or go full bore into ROM hacking as they are probably making a level hack, boss rush hack or wanting to change something a bit more fundamental.
Alternatively assembly might crop up if they want to hardcode a cheat, either by replicating the basic infinite write (attach a write this value to RAM every vblank and you have what most cheat cartridges do) or getting into what you are playing with up there it looks like an attacking the functions themselves (sub 1 to life counter so easily becomes a NOP or even an addition). Not many do this these days though with GBAATM ( https://gbatemp.net/threads/gbaatm-rebirth-gba-auto-trainer-maker-a-new-hope.564321/ ), or indeed even way back when with gabsharky.
 
  • Like
Reactions: SylverReZ

gukingofheart

Well-Known Member
OP
Member
Joined
Feb 2, 2022
Messages
235
Trophies
0
Age
124
XP
443
Country
United States
I learned how to do IF Statements for Codebreaker codes. So, there's more potential then I first assumed!
edit: I also just learned how to convert Action Replax Max codes, to find the original line in the debugger.

Thanks for that Divide by 2 help.. Now I can figure out how these Hit Anywhere codes are made.

edit: Gameshark V3 is what I needed to focus more on, not V2.. since I had a lot better progress with this.
 
Last edited by gukingofheart,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Expect to get angry at people for missgendering it's data +1