How to make a CodeBreaker Code? I managed to create a debug code, but it's the wrong format.

gukingofheart

Well-Known Member
OP
Member
Joined
Feb 2, 2022
Messages
235
Trophies
0
Age
124
XP
438
Country
United States
I learned recently how to debug for the GBA.
For MinishCap, I searched for the heart value & got this address "02002AEA"
I entered that into my debugger, got hit, and managed to create this code.
080526B6:4803

This gives me infinite health, but doesn't look like it's the correct format.

I read one tutorial that says I need to use a CRCgen... but if so, I can't get the program opened. I tried using DOS & DOSBox... not sure what this program is supposed to do, if I need to use it.

So, a bit confused here.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,373
Country
United Kingdom
https://doc.kodewerx.org/hacking_gba.html has all the various formats if you want to attempt to convert between things, https://doc.kodewerx.org/tools.html#gba if you needed the encryption/decryption tools.
There are no code converters I have seen for the major formats, most of what exists is more for flash cart cheats. It is a non trivial problem as it goes on anyway -- you can convert basic "always write this address" cheats easily enough but start trying to do the more exotic conditional codes (if this else, for this range/slide codes, while this happens) or Boolean or logical operations and some formats might not support it (but you could work around it for some things) and it all becomes a big mess. With most emulators, flash carts and cheat patching programs supporting every which way (and most new codes being exclusively in AR format) then easy enough to not bother with such things.

That looks like a codebreaker format code to me.
080526B6:4803 however is an odd code (don't know if that is encrypted) as 0 is a master code and does not have values in the first 4 characters according to the one above.

On a related note for others reading this. Zelda health cheats can be a fun one -- people want to search for the number of hearts they have which is a good instinct but actually as you can have half or even quarter hearts depending upon the game (go set yourself on fire in Ocarina of time, the residual burning will take quarters) you might want to change that accordingly, or go for "value changed" scans instead of direct numbers (better to have an end game save and find something easy to repeat that does little damage to allow you to get a few scans in, but you can do it from new with savestates/healing points I guess).
 

gukingofheart

Well-Known Member
OP
Member
Joined
Feb 2, 2022
Messages
235
Trophies
0
Age
124
XP
438
Country
United States
I just copied what I saw in the debugger itself.
Codebreaker are odd codes... but what you're telling me, even though I found 08 in the debugger, I can change this?

080526B6:????4803
Should I change the ? to 0's to look proper?

My first step I want to do, is find an easy code on gamehacking.org and find it myself through a ram search & debugger.
Will save these guides for now.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,373
Country
United Kingdom
https://web.archive.org/web/20080309104350/http://etk.scener.org/?op=tutorial and https://problemkaputt.de/gbatek.htm#gbacheatdevices if you are collecting links.
Cheats have three components in the base form
What form the cheat is, the general one being always write this address. There are some historical and practical considerations for why certain types exist but I will skip that one for this.
What location to look at for this*, where to write in the general one, others might be what to compare.
What data to use when you do, back to the always write thing then the data you write there**. The payload might also be a choice term here.

It can get a bit more complicated in that some cheats (or CPU instructions a bit later on) on some systems might have two pieces of input data and an output but the general principle still holds.

*This can be a bit abstracted, the GBA in this case pretty much always having its RAM data as most cheat making types care to twiddle it in the 02?????? region ( https://problemkaputt.de/gbatek.htm#gbamemorymap ) so a lot of things might skip the 02, certainly the 0 part, as it is always assumed and gain some characters to use for other things (multiples of 4 and 8 being nice for certain types of database and lookup).

**which can have some implications -- for Zelda hold the health low and for enemies it might put them in their last ditch fight routines, for the player especially at end game points where you have a bunch more hearts you might trigger the low health alarm as 3 hearts is now standard or you might be unable to shoot a power sword in those games that have that mechanic for full health. Some then find the current max health and set current health to that instead, assuming just giving you 20 outright does not work.

Yours looked to be a 0 code (0 being the form/code type) which is part of the setup for the cheat if using it on a real cart; sometimes it is nice to not have to select a game from a potentially thousands long list and more importantly for some it might need an address to hook (see also master codes) which is not necessarily easy to find on the hardware itself and might differ between games where emulators and to some extent flash carts don't care. Further to that the enhacklopedia link noted 0 did not have anything in the next few positions.
If it is a one line cheat then a the hold this address as might be a basic infinite health cheat would have a different form.

Replicating codes is a fine method of learning things. The main troubles will come if the maker of the code wants to be a bit flash and does something a bit lower level than might be needed, if there is a quirk that needs sorting (must lose battle, health drains to score at end of level, minigame using the same area and crashing/behaving oddly if normal gameplay health or whatever is held) or if there is anti cheat involved. The GBA having more of that than a lot that came before it (powerful enough to handle it and written in C for a lot of things which makes that sort of thing a bit easier to do) but not enough to tank things. If you do download a database and find something that looks overly complicated by all means ask on the forums and someone might be able to run through why something is doing what it does.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @realtimesave, iirc she said she is non binary