Quick Research & Development Thread Page 29

Started by Spherical Ice January 9th, 2010 2:23 AM
  • 478655 views
  • 1138 replies

MrDollSteak

Formerly known as 11bayerf1

Age 25
Male
Hong Kong
Seen 1 Day Ago
Posted March 24th, 2020
853 posts
11.5 Years
I've located a table that is possibly useful for ASM hackers (certainly those doing abilities). It controls the end of turn effects that tend to do damage such as Leech Seed, Burn, Poison and Nightmare (among other things).

In Fire Red it is located at 0182FC, and in Emerald at 0409C8.

I'm compiling a list of effects that will correspond to the relevant 4 byte entries (they're just pointers that get loaded).

Spoiler:
Entry 3 - Leech Seed Damage
Entry 4 - Poison Damage
Entry 5 - Toxic Poison Damage
Entry 6 - Burn Damage
Entry 7 - Nightmare Damage
Entry 8 - Curse Damage
Entry 9 - Wrap, Fire Spin, Whirlpool, etc. Damage

Touched

Resident ASMAGICIAN

Male
Seen February 1st, 2018
Posted October 19th, 2017
626 posts
5.9 Years
Change the order that badges appear on the trainer card (untested)
Simply makes the loop read from a lookup table before checking for the badge.
Spoiler:

.align 2
.thumb
    
@ 00 4B 18 47 XX + 1 XX XX 08 at 0x08AFC8 (0808AFC8 via r3)
hook_name:
    asr r7, r0, #0x10
    add r1, #0x11
    adr r0, order_table
    ldrb r0, [r0, r7]
    add r1, r1, r0
    ldrb r0, [r1]
    ldr r3, return
    bx r3
    
.align 2
return: .word 0x0808AFD0 + 1

@ Change the badge order using this table (reverse order)
order_table: .byte 7, 6, 5, 4, 3, 2, 1, 0

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Male
Seen 4 Days Ago
Posted July 31st, 2016
48 posts
5.8 Years
Reusable TMs in Emerald

So I was taking a peek through good old reseach and development today when I saw a cute little post about resuable TMs. You know, making TMs act like HMs. After seeing that it had been found on Ruby and FireRed, I thought, why not find it one Emerald? So I did.

To do this little bad boy, go to 0x1B6EE0 in your Emerald ROM and change the A9 there to 90.
Simple as that!

Here's a tiny little explanation for those wondering.

First, 0x1B6EE0 is this little section of code called when a TM or HM is being used. For simplicity's sake, I'll show what is relevant:

081B6EE0: 20A9 mov r0, #0xA9
081B6EE2: 0040 lsl r0, r0, #0x1
081B6EE4: 4284 cmp r4, r0
081B6EE6: bhi $081B6EF0
What it does, is first take the number A9, and put it in r0. Then, it takes r0 and left shifts it 1. This is the same as multiplying by 2 (A9 << 1 = A9 * 2 = 152). If one was to look at any item editor, they would see that this is the index of TM50 in Emerald. Then, this new value is compared to r4, which has the index of the TM/HM being used. If this number higher, the game knows that an HM was used, so it goes to the relevant area to keep it.

This is where we come in. What we want the game to think is that all TMs are the same as HMs. So, what we need to do is change the index it looks for into the index for the first TM, rather than the first HM. So looking at the items, TM01's index is 121. Dividing this by 2 gives 90, so that is why we put 90. The only downside to doing this really is that item 120 is included in this check, which doesn't matter because it's not a TM anyway (it's the Devon Goods). So there ya have it!
That's great .but how to remove the number show text
like "TM1 x1"
to
"TM1 "
i am bubble,and sorry my english is not good ......

MrDollSteak

Formerly known as 11bayerf1

Age 25
Male
Hong Kong
Seen 1 Day Ago
Posted March 24th, 2020
853 posts
11.5 Years
I'm not sure if this is the right place as such for this, but I guess it's sort of Research...

But anyway, the Egg hatching graphics are actually completely independent from the 'Pokemon' Egg sprite which has the index 19C. You can find this graphics in the HUD navigation for Fire Red but I thought I'd post the offsets here as well as the necessary image to replace them with in NSE. Just insert sprite Image+Palette and save the image and the palette to the Rom. It doesn't need any repointing, and the image is indexed.

Fire Red

Palette: 25F842
Image: 25F862

Emerald

Palette: 32B70C
Image: 32B72C

Deokishisu

Mr. Magius

Male
If I'm online, it's a safe bet I'm at a computer.
Seen March 15th, 2020
Posted March 4th, 2018
859 posts
14.3 Years
Obediance check for Emerald: 0x08045C6C

If you want that every mew/deoxys obey, just insert this at 0x08045C6C :

ldr r0, ByPassCheck
bx r0

.align 2
ByPassCheck: .word 0x08045C8A+1
Is this also the area where Emerald's badge obedience checks are located? I want to mess with the levels that badges allow obedience for.

Joexv

ManMadeOfGouda
joexv.github.io

Age 22
Male
Oregon
Seen 5 Days Ago
Posted December 21st, 2019
1,033 posts
7.6 Years
Is this also the area where Emerald's badge obedience checks are located? I want to mess with the levels that badges allow obedience for.
Levels checks are at:
08045CC6 (0)
08045D4A (10)
08045D58 (30)
08045D66 (50)
08045D74 (70)

The flags this checks are at 08045DC4. There are 4 (2 bytes each). The first flag (0x86E) makes everything obey.
New living flesh vessel who dis?

Xencleamas

Suddenly lurking in the shadows...

Male
Asgard
Seen 1 Week Ago
Posted August 7th, 2018
460 posts
6.3 Years
Sorry for repost but it should be deserved to be here now.

Emerald Encounter Music


I have been using Hopeless Trainer Editor as my current trainer editor in use to edit trainer data and to change encounter music assigned on trainers as well. I also wondered which songs (Sappy number does each value uses). I have researched that on. And, guess what? Just like in FireRed, an assigned encounter music number plays a certain theme. I was also using Unnamed Trainer Editor and since didn't listed up for Emerald so, here is the list:

Encounter Themes:
  • 0x0: The Youngster encounter theme which music number is 0x17C
  • 0x1: The Lass encounter theme which music number is 0x197
  • 0x2: The Tuber encounter theme which music number is 0x17B
  • 0x3: The Bug Maniac encounter theme which music number is 0x1A7
  • 0x4: The Black Belt encounter theme which music number is 0x1A0
  • 0x5: The Cool Trainer (now Ace Trainer) encounter theme which music number is 0x1A1
  • 0x6: The Team Aqua encounter theme which music number is 0x1A3
  • 0x7: The Team Magma encounter theme which music number is 0x1B9
  • 0x8: The Swimmer encounter theme which music number is 0x181 (edit at 0xB1C30 to change song number 81 01 00 00)
  • 0x9: The Kid encounter theme which music number is 0x1C1
  • 0xA: The Elite Four encounter theme which music number is 0x1C2
  • 0xB: The Hiker encounter theme which music number is 0x1C3
  • 0xC: The Reporters Gabby and Ty encounter theme which music number is 0x1C5
  • 0xD: The Gentleman encounter theme which music number is 0x18D

0xE until 0xFF (14 until 255) plays the Bug Maniac encounter theme which music number is 0x1A7. Alright! That goes for a while. I still need to research them more since there are further information about them on how they work and how they are listed up. I have seen its table around but it is not as dynamic to be easily repointed. I will update this post as soon as I have gathered information.

One important thing: During the process on expanding the Pokedex for Emerald, the ninth step messes up the load of 0x8 encounter music which I have discovered earlier. It seems that in the first twenty-nine 81 01 00 00-s includes the 0x8 encounter theme. To fix the 0x8 encounter music once again: go to 0xB1C30 then type 81 01 00 00.

To conclude this, you can have no longer translating the Controlling/Extending Encounter Music which is only for FireRed. You can have fourteen kinds of encounter music in Emerald (than FireRed being three unless you have applied that hack). You have too much already so expanding it on Emerald is pointless.

Emerald Overworld and Battle Textboxes


Getting lazy jogging down stuff from VBA's Logs? There are few people ask about that. Alright! For being fair, here are the data you need... again for Emerald:

Emerald Overworld Textbox: 0x08DDD768 (uncompressed image)
Emerald Overworld Textbox Palette: 0x08DDD728 (uncompressed palette)
Emerald Battle Textbox: 0x08C00000 (compressed image)
Emerald Battle Textbox Pal: 0x08C004E0 (compressed palette)

I guess you know what compressed and uncompressed images and palettes are? Good!

Xencleamas Untitled Pokémon Fan Game (Coming Soon!) Untitled Region (Coming Soon!)

Jaizu

Spanish Rom Hacker

Male
Spain
Online now
Posted 1 Week Ago
128 posts
10.4 Years
Hi! If you are using a 32x32px overworld for the PALYER(NDS style) you will notice that it will look weird when you choose your name.



To fix it just go to the direction 083A3BC0 and put 18 instead 10
It makes the PLAYER and Gary overworld look like a 32x32px.



Thanks and merits to daniilS, he literally made everything!

Mr.Pkmn

Ordinary ASM Magician

Seen 3 Weeks Ago
Posted July 31st, 2018
54 posts
12.1 Years

Encrypted Counters


FR saves 64 hidden words after the variables space. Apparently, only the first 51 of them are actually used (still their purpose is unknown) and have a max value of 0x00FFFFFF (16 millions). You can access them by using variable 0x4100 + [counter id * 2, only lower halfword] (but you need to disable the security key to read the actual value) and increment by 1 using the scripting command cmdc3 [id] and battle script command cmd60 [id].

Here's the list of counters i found:
0x0 n. saves
0x1 hall of fame (HHHH/MM/SS)
0x5 n. steps
0x7 n. poke battles
0x8 n. wild battles
0x9 n. trainer battles
0xA n. hall of fame
0xB n. poke caught
0xC n. poke fished
0xD n. eggs hatched
0xE n. poke evolved
0xF n. pokecenter heal
0x11 n. safari games
0x12 n. trees cut
0x13 n. rocks smashed
0x15 n. trades
0x17 n. link win
0x18 n. link loss
0x19 n. link draw
0x1A n. splash used 
0x1B n. struggle used
0x1C n. gamecorner max payout
0x20 ??? [manipulated by special 0xED]
0x26 n. pokemart purchases
0x27 n. itemfinder uses
0x28 n. thunderstorm weather in overworld (unused)
0x29 n. pokedex opened
0x2A n. elitefour win? (updated with hall of fame)
0x2B n. ledge jumps
0x2F ???
0x32 n. union room
0x33 n. berry crush

Deokishisu

Mr. Magius

Male
If I'm online, it's a safe bet I'm at a computer.
Seen March 15th, 2020
Posted March 4th, 2018
859 posts
14.3 Years

Encrypted Counters


FR saves 64 hidden words after the variables space. Apparently, only the first 51 of them are actually used (still their purpose is unknown) and have a max value of 0x00FFFFFF (16 millions). You can access them by using variable 0x4100 + [counter id * 2, only lower halfword] (but you need to disable the security key to read the actual value) and increment by 1 using the scripting command cmdc3 [id] and battle script command cmd60 [id].

Here's the list of counters i found:
0x0 n. saves
0x1 hall of fame (HHHH/MM/SS)
0x5 n. steps
0x7 n. poke battles
0x8 n. wild battles
0x9 n. trainer battles
0xA n. hall of fame
0xB n. poke caught
0xC n. poke fished
0xD n. eggs hatched
0xE n. poke evolved
0xF n. pokecenter heal
0x11 n. safari games
0x12 n. trees cut
0x13 n. rocks smashed
0x15 n. trades
0x17 n. link win
0x18 n. link loss
0x19 n. link draw
0x1A n. splash used 
0x1B n. struggle used
0x1C n. gamecorner max payout
0x20 ??? [manipulated by special 0xED]
0x26 n. pokemart purchases
0x27 n. itemfinder uses
0x28 n. thunderstorm weather in overworld (unused)
0x29 n. pokedex opened
0x2A n. elitefour win? (updated with hall of fame)
0x2B n. ledge jumps
0x2F ???
0x32 n. union room
0x33 n. berry crush
Some of these are probably used to give out the stickers on Four Island or to display link records in the upstairs of the Pokemon Center, but others may be RS leftovers that the Storyteller used to keep track of "Legendary Trainers". Like, how often you saved or used the itemfinder and such. In fact, Bulbapedia's list of the Storyteller's stories matches almost all of these, and I suspect the unknown ones check flags that RS used (such as number of berries planted or contests won).

Mr.Pkmn

Ordinary ASM Magician

Seen 3 Weeks Ago
Posted July 31st, 2018
54 posts
12.1 Years
Some of these are probably used to give out the stickers on Four Island or to display link records in the upstairs of the Pokemon Center, but others may be RS leftovers that the Storyteller used to keep track of "Legendary Trainers". Like, how often you saved or used the itemfinder and such. In fact, Bulbapedia's list of the Storyteller's stories matches almost all of these, and I suspect the unknown ones check flags that RS used (such as number of berries planted or contests won).
Yes, only some of them are used. The others are totally missing (like the heal at home, which is 0x10 but unused by the mom script)

FBI

Free supporter

Male
Unknown Island
Seen 3 Days Ago
Posted December 17th, 2019
1,910 posts
7.4 Years
Hey guys, I just wanted to post a warning about a PKSV bug which occurs quite commonly when testing out routines with callasm (perhaps it happens in XSE too, I haven't tried).

Steps to produce bug:
Write a routine and insert it into ROM
Write Script with callasm which uses said routine, compile it
Close PKSV

- Normally around here, I give my routines a game test -

Open a new PKSV and decompile the script
Make modifications to the routine
Make modification to the script and compile

Result:
Modification to the routine are undone. To avoid the bug you need to always reinsert the routine after compiling a script which uses the routine.
...

DizzyEgg

Age 22
Male
Poland
Seen 8 Hours Ago
Posted 4 Weeks Ago
795 posts
6.3 Years
I've finally updated this thread, too! Again, notify me if I missed something. I too shall be more diligent in keeping this thread updated. :D
Wouldn't it be better if each link moved you to a specific post instead of a page? Just like Lost Heart did with the ASM resource thread.

Telinc1

Weirdo Extraordinaire

Male
Sofia, Bulgaria
Seen April 3rd, 2020
Posted August 5th, 2018
168 posts
7 Years
I'm not sure if this has already been discussed here, but, would it be possible to port the breakable tiles from Sky Pillar (R/S/E) to Fire Red? I mean, to make them only able to be surpassed using the bike and non stopping.
Definitely possible, and a similar thing is actually done in the cave in Four Island (forgot the name). There's a scripting command which deals with these sort of things, I think it was cmd3c or cmda6 IIRC. In RSE the same functionality is also used for the ash grass in Route 113. There's a post in this thread which explains the usage of the command, too lazy to dig it up.

Check out my hacks by clicking on the userbar!
Check out my new website (this link now works!)!

Telinc1

Weirdo Extraordinaire

Male
Sofia, Bulgaria
Seen April 3rd, 2020
Posted August 5th, 2018
168 posts
7 Years
I just made a little discovery for Pokédex hacking to add on to this post. What's been really bugging me is how you can change the amount of items the National Pokédex has, but the byte for the Regional one isn't known. Well, the 0x13 at 0x452010 is that "missing unknown value". Of course, the amount of items in the National Pokédex is at 0x4520C8, just like Chaos Rush discovered.

Check out my hacks by clicking on the userbar!
Check out my new website (this link now works!)!

Spherical Ice

Age 22
Bristol, UK
Seen 3 Hours Ago
Posted March 11th, 2020
5,259 posts
12.5 Years
Just a reminder that this thread is not for asking questions, unless it is directly asking a question about a previous post. If you want help, use the Beginner's Lounge and its relevant stickied threads. If you have a small amount of (previously undocumented in this thread or forum) new research and want people to help with it, then that is probably the only acceptable case to ask questions here. Please keep this in mind!

PurpleOrange

still don't know what I'm doing

Age 22
Male
Littleroot Town (UK)
Seen November 27th, 2018
Posted September 29th, 2018
366 posts
6.7 Years
some useful RAM stuff

emerald RAM offsets for map bank, map number, and x and y coordinates
0x02025A0C stores the current player map bank
0x02025A0D stores the current player map number
0x02025A08 stores the player's x coordinate
0x02025A0A stores the player's y coordinate

roaming legendary RAM offsets for their current location
RS: 0x02079303
FRLG: 0x0203F3AE
E: 0x0207BC86

Le pug

Creator of Pokémon: Discovery / Fat Kid

Age 27
Male
Le bed
Seen February 12th, 2020
Posted June 6th, 2019
871 posts
6.8 Years
some useful RAM stuff

emerald RAM offsets for map bank, map number, and x and y coordinates
0x02025A0C stores the current player map bank
0x02025A0D stores the current player map number
0x02025A08 stores the player's x coordinate
0x02025A0A stores the player's y coordinate

roaming legendary RAM offsets for their current location
RS: 0x02079303
FRLG: 0x0203F3AE
E: 0x0207BC86
good find on the legendary ram offsets but the previous map offsets have already been found and go hand in hand with the intro enhancement patch made by diegoisawesome found here: click
Retired. Thank you guys for a wonderful five years.
Male
São Paulo, Brasil
Seen September 7th, 2019
Posted September 7th, 2019
275 posts
5.1 Years
I know it's nothing hard, nothing WOOOOW, but that's something and my first alone-research-area collaboration. This is for Fire Red:

INFINITE SAFARI TIME


Simply go to 0xA0F1A and replace the 01 38 there, for 00 38.

The game will still give you 600 steps, but it won't decrease, so you will be there until you retire or run out of Safari Balls.
When I figure out how to hide the step count in the start menu, I'll edit this post.
My Main Team:


Male
São Paulo, Brasil
Seen September 7th, 2019
Posted September 7th, 2019
275 posts
5.1 Years
Well, this is what I did, while learning how to do stuff like debugging and doing new mechanics changes in the game.
Thanks to Touched-sensei, who helped me through the entire process. Thanks to daniilS and kleenexfeu, who also helped in the very end. This is for Fire Red:

REUSABLE POKÉBALLS


- First, go to 0xA1E30. Change 01 21 to 00 21 (with this, Pokéballs won't be deleted when you select them in your bag);
- Now, find some free space and insert this routine there:
Spoiler:
.text
.align 2
.thumb

main:
	bl deleteball
	mov r9, r4
	pop {r4-r7}
	pop {r0}
	bx r0

deleteball:
	ldr r0, var_800E
	ldrh r0, [r0]
	cmp r0, #0xC
	bls pokeball

notpokeball:
	mov r1, #0
	bl bagremoval	

pokeball:
	mov r1, #1

bagremoval:
	ldr r2, =(0x809A1D9)
	bx r2
	
.align 2
var_800E: .word 0x0203AD30

Here's a compiled version:
Spoiler:
00 F0 04 F8 A1 46 F0 BC 01 BC 00 47 04 48 00 88 0C 28 02 D9 00 21 00 F0 01 F8 01 21 01 4A 10 47 30 AD 03 02 D9 A1 09 08

This is the code that deletes the Pokéball;
- Finally, go to 0x2D924 and paste write this "00 48 00 47 XX XX XX 08" there. It's a hook to the routine you just inserted. Change the XX XX XX for the pointer to the offset you placed the above routine. Remember to +1 the offset before changing it to a pointer.

With this hack, you won't spend Pokéballs if you don't capture a wild Pokémon. I wanted to do it inspired in the anime.
Again, simple, some people will think it's a broken functionality, but it will do well for that time when you encounter a shiny Pokémon with that one single Pokéball in your bag. =P
Thanks again, everybody. Hope it's helpful.

EDIT:
Thanks to mbcn10ww, I fixed this hack.
Unfortunately, I couldn't test it on the Safari area, as it's saying other saves are not compatible (but I don't know why, since I might have tried to use saves of games with other different hacks. It's been more than a semester I don't even see my games).
Nevertheless, I tested it on regular places and areas, and it is still working. From the previous hack, I set a new condition before removing item from the bag.
I call the removing routine anyway. The difference is that I pass on a 0 value as the number of items to be deleted if it's not a pokeball.
The "cmp r0, #0xC" compares the last item used with the last pokeball index (Premier Ball). If it is lower or equal to that, it is a pokeball. Else, r1 receives 0 and no item should be deleted.
Thanks for the heads up, mbcn10ww!
If anyone can test the Safari part, jumping straight there, or anything, I would appreciate!
My Main Team: