The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Research & Development (https://www.pokecommunity.com/forumdisplay.php?f=195)
-   -   Quick Research & Development Thread (https://www.pokecommunity.com/showthread.php?t=205158)

BirdstarCat13 May 21st, 2018 9:12 AM

Quote:

Originally Posted by BluRose (Post 9879313)
we include it for consistency with the game itself :)
various tutorials replace pointers, which must refer to the memory type at the end--reverse pointers, in other terms
so the game would refer to 0x43156 as 0x08043156, so we decide to represent it as such when referencing any address

That's still really confusing, I don't see why you couldn't just at least include the *actual* offset for people who are just looking for what edit to make and where

Lancekoijerwillborough May 27th, 2018 2:39 AM

Quote:

Originally Posted by BirdstarCat13 (Post 9879344)
That's still really confusing, I don't see why you couldn't just at least include the *actual* offset for people who are just looking for what edit to make and where

08 needs to be identified to determine what memory can the offset be found. If you expanded the rom, you would probably need to take a look at 08 part because you need to change it into 09, because again the code is read as that and it refers to the memory. You would not just write 0x43156 because "generally' speaking, it is read as 0x00043156 which is very different from 0x08043156.

0x00 refers to BIOS
0x02 refers to WRAM
0x03 refers to IRAM
0x04 refers to I/O
0x05 refers to PALETTE
0x06 VRAM
0x07 OAM
0x08 ROM

Look at the Visual Boy's Memory as your reference.

The codes that are provided here are not meant for Hex Editor only.
In general knowledge, 0x00043156 refers to BIOS.

Hope this helps you understand why 08 is included.

BirdstarCat13 May 27th, 2018 1:15 PM

Quote:

Originally Posted by Lancekoijerwillborough (Post 9881482)
08 needs to be identified to determine what memory can the offset be found. If you expanded the rom, you would probably need to take a look at 08 part because you need to change it into 09, because again the code is read as that and it refers to the memory. You would not just write 0x43156 because "generally' speaking, it is read as 0x00043156 which is very different from 0x08043156.

0x00 refers to BIOS
0x02 refers to WRAM
0x03 refers to IRAM
0x04 refers to I/O
0x05 refers to PALETTE
0x06 VRAM
0x07 OAM
0x08 ROM

Look at the Visual Boy's Memory as your reference.

The codes that are provided here are not meant for Hex Editor only.
In general knowledge, 0x00043156 refers to BIOS.

Hope this helps you understand why 08 is included.

So why not just include a note about it? Like, "here's the technical offset and the offset you should put into a hex editor"

kalarie May 27th, 2018 2:51 PM

Because it's more convenient that the person who wants to learn romhacking takes time and effort to learn from tutorials, than for an experienced romhacker to explain himself in a simplified manner.

Lancekoijerwillborough May 28th, 2018 2:31 AM

Quote:

Originally Posted by BirdstarCat13 (Post 9881635)
So why not just include a note about it? Like, "here's the technical offset and the offset you should put into a hex editor"

It's so inconvenient to put "here's the technical offset and the offset you should put into a hex editor" note to every research that will be posted here. This is Quick Research Thread actually so if you still have questions, because it has been explained already, you may want to make a thread on Rom Hacking Section.

BirdstarCat13 May 28th, 2018 6:32 AM

Quote:

Originally Posted by Lancekoijerwillborough (Post 9881796)
It's so inconvenient to put "here's the technical offset and the offset you should put into a hex editor" note to every research that will be posted here. This is Quick Research Thread actually so if you still have questions, because it has been explained already, you may want to make a thread on Rom Hacking Section.

I was just saying - the post with the offsets made it clear it was meant to help people edit certain locations, so it should have been written in a way convenient for that. That's all I'm saying.
What I was talking about was more listing the two sets of offsets, *not* literally including your explanation of memory types in each post that has offsets in it

BirdstarCat13 May 28th, 2018 6:36 AM

Quote:

Originally Posted by kalarie (Post 9881659)
Because it's more convenient that the person who wants to learn romhacking takes time and effort to learn from tutorials, than for an experienced romhacker to explain himself in a simplified manner.

Yes but I learn nothing if I can't understand the offsets. I literally don't care about "memory types", I'm just on this thread to find out what needs to be modified ;)

destinedjagold May 28th, 2018 7:22 PM

Quote:

Originally Posted by BirdstarCat13 (Post 9881869)
Yes but I learn nothing if I can't understand the offsets. I literally don't care about "memory types", I'm just on this thread to find out what needs to be modified ;)

If you can't be bothered to learn about these "memory types" then don't expect others to spoon-feed you either.

DrFuji June 20th, 2018 11:04 PM

The first post has been updated (after nearly two years!) with links to almost one hundred informative posts! I love every discovery in this thread and everybody who's helped contribute to the community.

asm resource thread update coming soon

Lunos June 28th, 2018 9:22 PM

This information seems to be important enough and it's not mentioned in the main post, so I just took the liberty of bringing it here.

Forcing the Set Battle Style in Fire Red
Quote:

Originally Posted by haven1433
For anyone else who's interested - I was able to get in touch with DoesntKnowHowToPlay, who was able to help me.

In FireRed, starting at 0x1D8727, change 5 bytes to 28 92 87 1D 08. This modifies the battle script to bypass whatever the user set in the Options menu and always act like "Set" mode.

Source.

xizqu June 30th, 2018 2:07 PM

Quote:

Originally Posted by BirdstarCat13 (Post 9881869)
Yes but I learn nothing if I can't understand the offsets. I literally don't care about "memory types", I'm just on this thread to find out what needs to be modified ;)

08 is required for telling someone what area of the rom it is. If be just put the offset without the memory, what bank would you change? You just use hxd so you don't get access to other Banks but what if he meant 02 which is ram. We hack banks 02, 03 sometimes 04 but mostly 08. So it's pretty much required. If he meant 02 and you changed it in 08, you'd break your game.

BirdstarCat13 July 1st, 2018 2:46 AM

Quote:

Originally Posted by xizqu (Post 9896001)
08 is required for telling someone what area of the rom it is. If be just put the offset without the memory, what bank would you change? You just use hxd so you don't get access to other Banks but what if he meant 02 which is ram. We hack banks 02, 03 sometimes 04 but mostly 08. So it's pretty much required. If he meant 02 and you changed it in 08, you'd break your game.

I think it'd be a safe assumption if he hadn't had the bank listed, but if it's the absolute offset, then you already know that by definition it's by the ROM/bank 08

Wobb July 1st, 2018 2:21 PM

DPPt Berry Info
Berries are found in itemdata/nuts_data.narc

00 - Berry Size (cm). There will be a decimal point before the last digit of the number in decimal. (Ex: 0x7E -> 126 -> 12.6 cm)
01 - ???
02 - Firmness:
Spoiler:

01 - Very Soft
02 - Soft
03 - Hard
04 - Very Hard
05 - Super Hard

03 - ???
04 - Hours per Stage (There are 4 stages)
05 - Moisture drain rate without Mulch. When a Berry is planted, the moisture is 100. Every 60 minutes, the moisture decreases by this amount, with the soil changing color, until it reaches 0, where the soil is gray.
06 - Spiciness
07 - Dryness
08- Sweetness
09 - Bitterness
0A - Sourness
0B - Smoothness

Ephraim225 July 5th, 2018 10:04 PM

Ribbon Data

So I researched this on a whim. This applies to all the GBA games but FRLG never displays ribbon data anyhow and it doesn't look like anyone documented it, so here we are. Normally Ribbon data is impossible to check or edit because it's encrypted and the decrypt function can't do anything with it in particular for some reason. But if you disable encryption completely (as seen here) then you can check or edit ribbons in your ASM codes much more easily.

The game uses four bytes to track a Pokémon's ribbons. They are the last four bytes of the "Misc" data subsection. Individual bits are used to track Ribbons from the contests as well as some additional ribbons. For contest ribbons, 3 bits are used to track how many ribbons from each category that Pokémon has. You can normally only get 4 ribbons in each category, but if you set all the bits for one category to 1 the game can show up to 7 ribbons from one category (which will lead to duplicate ribbons.) There are 32 possible ribbons to get but you can technically edit a Pokémon to have up to 47 (which will crash the game at the ribbon viewer.)

Bits 1~3: Cool contest ribbons
Bits 4~6: Beauty contest ribbons
Bits 7~9: Cute contest ribbons
Bits 10~12: Smart contest ribbons
Bits 13~15: Tough contest ribbons
Bit 16: League Champion ribbon
Bit 17: Lv. 50 Battle Tower ribbon
Bit 18: Lv. 100 Battle Tower ribbon
Bit 19: Artist ribbon
Bit 20: Effort ribbon
Bits 21~27: These ribbons have no description. I believe they are mostly unused aside from the ribbons that come from the GCN games.
Bits 28~32 DON'T track ribbon data, they're for something else.

So, a Pokémon that has all possible ribbons with no duplicates would have 07 FF C9 24 in those four bytes.

Le pug July 7th, 2018 7:44 PM

Quote:

Originally Posted by Sakakii (Post 9876154)
Tested some sounds in FireRed, I want to test more but I don't know how to find more sounds, if anyone can help me that's great. After 15A there seems to be no more sounds they all generate silence, so Idk where to go :(

Spoiler:

these can be used by the command 'sound' in xse (example: sound 0xD, use checksound to make the sound finish playing before script continues)
0D = Hit by attack/take dmg
D1 = ?
D2 = ?
D3 = Sounds like some buglike Pokemon cry (but no actual pkmn that I know)
D4 = ?
D5 = ?
D6 = Basically Thunder the move
D7 = A short and quick clap
D8 = Silent
D9 = Unsure, 2nd part reminds me of some sort of warp sound
DA = Wish like sound, like a star?
DB = Very intriguing sound, might be fitting for an alien like Pokemon
DC = Spooky sound lasts like 3-4s, amazing sound effect for a horror area
DD = 1st part of moonlight?
DE = Reminds me of Donald Duck when he talks
DF = Weak tornado? Similar to Twister the move
E0 = Kinda like birds singing joyfully
E1 = Some weird sound then a drum
E2 = Kinda like pouring water over someone
E3 = Silent
E4 = Silent
E5 = Sweet Scent
E6 = Sad sound, like a hurt Meowth or Skitty
E7 = Silent
E8 = Stat boost (in-game, like after Bulk Up)
E9 = 3s long, kinda like a monster moving underground? Could be a great cry.
EA = Kind of like an angry crowd but very short like 0.x s...
EB = Like ice breaking?
EC = Silent
ED = I've never heard this before... decent sound for horror setting I s'pose,
kind of like an angry, evil fairy
EE = Stat drop (in-game, like getting Intimidated)
EF = Lasts 4s? Kinda like a swarm of bees.
F0 = No clue. Very short sound.
F1 = Door open/close
F2 = Idk, very short
F3 = Kinda like using a repel, seems like theres some silence after its done
playing (like for 1-2s)
F4 = Like saving your game sound. Some silence after playing.
F5 = Idk, garbage imo, very short
F6 = Something to do with setting options?
F7 = Same as f5
F8 = Buy/sell sound
F9 = S.S. Anne leaving
FA = SOUNDS VERY familiar. Harpy?
FB = Similar to FA
FC = Like FB/FA, but ends abruptly with some error sound
FD = Somewhat peculiar, alien like sound.
FE = Like Wish heal
FF = Error sound, like you chose the wrong alternative
100 = PC Heal
101 = Lv up
102 = Catch Pkmn
103 = Caught a Pkmn
104 = Got a badge?
105 = Some kind of success fanfare, RS style
106 = Pick Berry from tree sound
107 = silent
100 to 15A is basically these https://www.pokecommunity.com/archive/index.php/t-123520.html
15B = silent
15C =silent
15D =silent
15E =silent
15F =silent

You can hear / see all the sounds in Fire Red in the following video. Also, I've added the sound 0x## for each so if you want to just listen for some sounds you want for a script then just throw it in a script, they are compatible:

[hd]16kq82y91UE[/hd]

And since I'm posting that one, might as well post my Emerald version as well:

[hd]NovD5qHerAo[/hd]

Zeturic July 9th, 2018 4:58 PM

Wonder Trade with NPC Trainers [FR]

Basically, this is a WT system that uses the NPC trainer data as the pool of potential trades. It picks a random trainer, and a random slot from that trainer's party, and that's what you get traded.

In case it's not obvious, this includes the actual trade animation, and the Pokémon in question will keep the NPC trainer's OT ID and OT Name, as well as any held item and custom moves it may have assigned to it.

Additionally, if the Pokémon you receive evolves by trade, it will evolve when you get it. Trade + Held Item evolutions would work as well, but I doubt there are many NPC trainers that have Scythers with Metal Coats (for example).

A few things to keep in mind if you decide to use this:
  • You could end up with a Nat'l Dex Pokémon early. You'll probably want to enable foreign Pokémon trading and evolution, assuming you aren't simply giving out the Nat'l Dex at the beginning of the game.
  • Some NPC trainers such as Giovanni have names that are too long to fit in the OT Name field. These trainers are excluded from the pool.
  • Any Pokémon that isn't included in a team of an eligible trainer can't be received at all.
  • It is possible to get the same Pokémon multiple times.
  • You'll probably trade with a lot of people named GRUNT, unless you blacklist all such trainers.

Nidoran Gender Symbol [FR]

I don't know if this bothers anyone else, but I never liked how the Nidorans get special treatment with regards to the gender symbol (because it's part of their name, they don't have one, unless you nickname them).

You can get rid of this but putting
00
at all of the following locations:

Code:

0x08136238
0x0813623C
0x081218E4
0x081218E8
0x08049718
0x0804971C


You'll probably want to remove the gender symbols from their species names if you use this, or else it'd essentially be duplicated (once in their name, and then the standard one every Pokémon gets).

Edit: agsmgmaster64 found a few offsets I missed, as well as the Emerald equivalents. See here.

tkim July 28th, 2018 9:28 AM

Quote:

Originally Posted by Mr.Pkmn (Post 9368998)
In Gen 3, Protect/Detect/Endure are bugged. The game is supposed to read the probability from a table which has only 4 entries, thus reading garbage data after the 4th consecutive protect.

To get the correct behavior (like gen 5+, no cap) replace the bytes at 0x26FB6 with this (FR):
Code:

01 7A 14 88 CC 40 1D F0 84 FF 21 1C


If you ever manage to get off 16 consecutive protects, it will fail the next one because of precision .

I'm having trouble understanding the routine behind this, may you go more into depth about your solution? Could I also add the cap of 12.5% without having to repoint the routine?

edit: I tested your fix and it doesn't work as you intended. I was able to use Protect without fail after passing 16 successes.

Mr.Pkmn July 31st, 2018 12:24 PM

Quote:

Originally Posted by tkim (Post 9907014)
I'm having trouble understanding the routine behind this, may you go more into depth about your solution? Could I also add the cap of 12.5% without having to repoint the routine?

edit: I tested your fix and it doesn't work as you intended. I was able to use Protect without fail after passing 16 successes.

1) Loads the number of consecutive protects (n)
2) Loads the first entry of the protect probability table (0xFFFF or 100%)
3) Shifts to the right n bits from the probability. Equivalent to a division of 2^n

If you used 17 protects, you would remove 17 bits from a 16 bit number, making it zero.
However you're right because the game checks if the protect probability is greater or equal than the random number, giving a 1/65535 chance of not failing protect.

Super Versekr Dark August 9th, 2018 12:39 PM

Quote:

Originally Posted by Spherical Ice (Post 9092312)
To remove the black bar animation, cry and Pokémon sprite and all, that shows when you use a HM, do the following:

Posting this here in case anyone else wants it.


FR: 00 00 00 00 00 00 00 00 00 00 00 00 at x860C2.
EM: 00 00 00 00 00 00 00 00 00 00 00 00 at xB8536
Ruby: 00 00 00 00 00 00 00 00 00 00 00 00 at x88102

Super Versekr Dark August 15th, 2018 6:19 PM

I need help with this:


I have been modifying the routine of Chacha Dinosaur, well I suppose that here they could help me to finish it since then I already have the pointers, I do not know if they can help me and in that way we help rom hackers of ruby;)

EV-enhancing items (Power Items)

Spoiler:
.text
.align 2
.thumb
.thumb_func

Main:
push {r2}
mov r0, r8 /*Load pokemon slot no*/
mov r1, #0xC
mov r2, #0x0
bl Decrypter /* Load pokemon's item */
lsl r0, r0, #0x10
lsr r0, r0, #0x10
pop {r2} /* Restore Pokerus Factor*/
cmp r0, #0xAF
beq EnigmaBerry
add r3, r0, #0x0
bl GetItemEffect /* Get Held Item's Effect Byte*/
lsl r0, r0, #0x18
lsr r0, r0, #0x18
cmp r0, #0x18
bne NoPowerItem
add r0, r3, #0x0
bl GetSecondEffectByte
lsl r0, r0, #0x18
lsr r0, r0, #0x18
cmp r0, #0x0
beq MachoBrace
add r1, r6, #0x1 /*Load a Power Item's Secondary Effect Byte*/
cmp r1, r0 /*Match items*/
bne NoPowerItem /*No Power Item or No Match for that particular stat*/
lsl r2, r2, #0x2
add r4, r4, r2 /* Add 4 EVs or 8 (due to Pokerus) */
NoPowerItem:
ldr r3, =0x0803FFB9
bx r3

EnigmaBerry:
ldr r3, =0x0803FF6F
bx r3

MachoBrace:
ldr r3, =0x0803FFB5
bx r3

Decrypter:
ldr r3, =0x08031D71
bx r3

GetItemEffect:
ldr r1, =0x080A993D
bx r1

GetSecondEffectByte:
ldr r1, =0x080A9961
bx r1

/*At 3FF58: 04 1C 54 43 00 49 08 47 XX+1 XX XX 08 00 00 00 00 00 00 00 00 00 00*/
/*At 3FFDC && 3FFE2: FC to limit EV growth for each stat to 252 */

Spherical Ice August 18th, 2018 8:49 AM

00 00 00 00 00 00 00 00 00 00 00 00 at x82980 will enable wilds in the Tanoby Ruins chambers (maps 2.27 to 2.34) irrespective of if the Tanoby Key puzzle has been solved (i.e. flag 0x849 is set).

At x3CA71C, there is a list of bytes which correspond to the Unown forme for each slot for the wilds of the Tanoby Ruins chambers. There are twelve bytes for each chamber, and six chambers in total. The bytes range from 00 to 1B (dec 27), and the first 26 (00 to dec 25) bytes follow the order of the alphabet (A-Z), with 1A (dec 26) being ! and 1B (dec 27) being ?. The byte order matches the probability listing for the Grass wilds of a map, so the 12th byte has a 1% chance of appearing, and so on.

The routine at x829FC is how it determines which chamber to use (by subtracting 27 from the map number at x82A42), so you can change this to be whichever map number your first Unown chamber is on. The lsls around this area (x82A4A) are used to multiply the (map number - 27) by six, as there are six chambers, so change that arithmetic if you have a different number of chambers. This is why, as Squeetz points out here https://www.pokecommunity.com/showthread.php?p=9578348#post9578348, the game will crash if the map number is not between 27 and 34 when spawning Unown.

kalarie September 10th, 2018 5:39 PM

3 Attachment(s)
I haven't seen this documented anywhere, so I thought I should post it here.

Every Overworld Sprite has a data address with 0x24 bytes of data. (See for example https://www.pokecommunity.com/showthread.php?p=3674554#post3674554 or JPAN's Hacked Engine Manual)

The 14th byte (That was a mystery) determines what kind of footprints will appear when walking on sand. The byte should be either value 0x00 (No Footprints), 0x01 (Footprints) or 0x02 (Bicycle). Any other value will cause the game to freeze when stepping on sand.

To Illustrate:
Attachment 86202 Attachment 86203 Attachment 86204

hjk321 September 13th, 2018 10:06 AM

Quote:

Originally Posted by Shiny Quagsire (Post 7434713)
I actually found the other half of this that changes things to greyscale without doing any division or other crazy ASM. It's one RAM location:
Code:

0x02036E28


So just wrote a 0x1 to that offset for greyscale, and 0x2 for sepia (I think...). To reset, set it to 0x0.

Small thing and I know this is like 6 years late but if you put this in a mapscript you will need to set it as 01 (setmaptile script) or it won't change the colors before loading the map. Now even if people save and quit while the "shader" is active it will still be there when they come back, provided you make a decent map script that loads from a flag...

AtecainCorp. September 16th, 2018 9:55 AM

POKEMON RUBY RELATED
I found limiter related to pokemons in the Contests. So for rid off limiter from contests.
Adress - B278C
In there change 9b 01 to new number related to SLOTS. Not same Pokemon in dex. But Slots. That makes formes even working with contests. In my case for be sure about All pokes i repleace 9b 01 with ff 04... And prest. It works.

https://media.discordapp.net/attachments/419213926245335041/490935154261360651/2.PNG

Super Versekr Dark September 18th, 2018 7:53 AM

Door 16x16 Pokémon Ruby:

583DC: FF F7 D6 FF - 00 00 00 00

583E6: FF F7 01 FD - 00 00 00 00

https://i.imgur.com/yupI62I.gif


All times are GMT -8. The time now is 8:53 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.