Advertiser Content

ASM & Hex Snow Warning routine in FireRed

Started by DarkCyborg March 30th, 2018 2:35 PM
  • 1099 views
  • 11 replies
Seen 2 Weeks Ago
Posted July 29th, 2019
18 posts
1.8 Years
Okay, I cannot post links, even without tags or images. That's annoying, as I could make the job of helping me much more workless with links and images. But I know that there are good reasons for that.

I want to insert Snow Warning in Pokémon FireRed 1.0 version. There's a thread in the community that has an ASM routine to just do that. And there's another thread, made by FBI, that shows a simple way to insert ASM routines in a rom.

That said, I copied that code and pasted it in notepad. Saved it as "snowwarning.asm" and got my .bin file. I opened it with Cygnus Hex Editor, copied the entire code, and pasted it on a free space on rom, which address was 0xEB0B20. After that, I followed the instructions of Snow Warning's thread, which was:

#Insert 00 48 00 47 xx xx xx 08 at 1A140
where xx xx xx was the pointer's address + 1 in little indean. I'm not sure what was "pointer's address", I just take it as the place where I pasted the bin's code.

So, I went to address 0x1A140, and pasted 00 48 00 47 21 0B EB 08 (where 21 0B EB is EB0B20+1).

After that, I went to PGE, expanded the abilities by 41, set 118 (defined as Snow Warning) to Squirtle, and when I open the game and go for a battle... it freezes and that's it.

So, where's my mistake? What should I do to fix?
Male
Seen 2 Weeks Ago
Posted 2 Weeks Ago
113 posts
4.4 Years
Okay, I cannot post links, even without tags or images. That's annoying, as I could make the job of helping me much more workless with links and images. But I know that there are good reasons for that.

I want to insert Snow Warning in Pokémon FireRed 1.0 version. There's a thread in the community that has an ASM routine to just do that. And there's another thread, made by FBI, that shows a simple way to insert ASM routines in a rom.

That said, I copied that code and pasted it in notepad. Saved it as "snowwarning.asm" and got my .bin file. I opened it with Cygnus Hex Editor, copied the entire code, and pasted it on a free space on rom, which address was 0xEB0B20. After that, I followed the instructions of Snow Warning's thread, which was:



where xx xx xx was the pointer's address + 1 in little indean. I'm not sure what was "pointer's address", I just take it as the place where I pasted the bin's code.

So, I went to address 0x1A140, and pasted 00 48 00 47 21 0B EB 08 (where 21 0B EB is EB0B20+1).

After that, I went to PGE, expanded the abilities by 41, set 118 (defined as Snow Warning) to Squirtle, and when I open the game and go for a battle... it freezes and that's it.

So, where's my mistake? What should I do to fix?
Sounds like you did everything correct. What's the exact name of the thread for Snow Warning?
Seen 2 Weeks Ago
Posted July 29th, 2019
18 posts
1.8 Years
Okay, I contacted MrDollSteak, which created the Snow Warning routine. He said that I must to change the battle script which is CC CC CC 08 in the Bin, to the point to where I insert the battle script.

I didn't see nothing about battle script on that routine, neither on routine-adding tutorials. I just followed the steps to add a routine to my rom and tried to do that with Snow Warning, and it didn't worked.

So, what should I do? What is that "battle script" that I must to point to? And where is it?
Male
California
Seen August 11th, 2018
Posted July 27th, 2018
82 posts
1.6 Years
Okay, I contacted MrDollSteak, which created the Snow Warning routine. He said that I must to change the battle script which is CC CC CC 08 in the Bin, to the point to where I insert the battle script.

I didn't see nothing about battle script on that routine, neither on routine-adding tutorials. I just followed the steps to add a routine to my rom and tried to do that with Snow Warning, and it didn't worked.

So, what should I do? What is that "battle script" that I must to point to? And where is it?
Oops, didnt see that earlier!

Check out this post. This is the ability moxie. It has a Battle Script. If MRDS says you need a BS and its not their, you need to make one or point the ASM to where one is located. Battle Scripts are mostly used on the move resource thread. Thats where i got my BSP experience. Maybe try adding a few moves and move effects into your rom for practice?

Im sorry i cant really answer what you do now. I stay away from incomplete work unless im trying to finish it. Good luck!
Seen 2 Weeks Ago
Posted July 29th, 2019
18 posts
1.8 Years
Oops, didnt see that earlier!

Check out this post. This is the ability moxie. It has a Battle Script. If MRDS says you need a BS and its not their, you need to make one or point the ASM to where one is located. Battle Scripts are mostly used on the move resource thread. Thats where i got my BSP experience. Maybe try adding a few moves and move effects into your rom for practice?

Im sorry i cant really answer what you do now. I stay away from incomplete work unless im trying to finish it. Good luck!
Actually, he didn't included the battle script, which was:

Insert this into free space and point to it.

39 20 00 FA 20 C0 03 02 NN EE XX 08 10 84 01 3A 45 07 0D 00 00 00 00 41 DC 92 1D 08 3F

Then change NN EE XX to point to this

13 B4 E7 00 FD 1A FE E1 D5 D8 D9 00 DD E8 00 DC D5 DD E0 AB
My first attempt to do that failed. Then, he said that I didn't included the 'Set Word' script, and so, I should to:

Replace FA 20 C0 03 02 nn EE XX 08 with

2E 20 C0 03 02 NN 2E 21 C0 03 03 EE 2E 22 C0 03 02 XX 2E 23 C0 03 02 08.
The result is shown on the image below (show spoiler), where:

EB0B20 is the routine;
EB0BA0 is the battle script;
EB0BE0 is the code that NN EE XX should point to.

Spoiler:


Well, it's not working yet. If there's anything more that is needed to make this routine work, I have not implemented (that's the first change I'm doing in this rom, nothing else was changed!).
Male
California
Seen August 11th, 2018
Posted July 27th, 2018
82 posts
1.6 Years
At the hook, you add +1. I know you did that. Whenever you point to asm, always +1 to the offset.

.8CCCC(whatever amount of C's) is pointing to a script, not asm. Do not add +1 to the CC offset nor the NN EE XX.

Try both replacing and not replacing(Replace FA 20 C0 03 02 nn EE XX 08 with

2E 20 C0 03 02 NN 2E 21 C0 03 03 EE 2E 22 C0 03 02 XX 2E 23 C0 03 02 08.) and see what happens.

TLDR: make NN EE XX (E0 B0 EB) and make CCC (A0) instead of A1.

Edit: Super tldr: Go to eb0b78 A0 and Eb0ba8 E0
Seen 2 Weeks Ago
Posted July 29th, 2019
18 posts
1.8 Years
At the hook, you add +1. I know you did that. Whenever you point to asm, always +1 to the offset.

.8CCCC(whatever amount of C's) is pointing to a script, not asm. Do not add +1 to the CC offset nor the NN EE XX.

Try both replacing and not replacing(Replace FA 20 C0 03 02 nn EE XX 08 with

2E 20 C0 03 02 NN 2E 21 C0 03 03 EE 2E 22 C0 03 02 XX 2E 23 C0 03 02 08.) and see what happens.

TLDR: make NN EE XX (E0 B0 EB) and make CCC (A0) instead of A1.

Edit: Super tldr: Go to eb0b78 A0 and Eb0ba8 E0
I'm almost sure that you meant E0 0B EB, but whatever, I tried all the cases (both with 0B and B0, replacing and not). All of them didn't work.

I was thinking about FR's version. I'm using the one that is compatible with PGE, I'm not sure if that's the reason. Have anyone else been successful to make Snow Warning work on Fire Red?
Male
California
Seen August 11th, 2018
Posted July 27th, 2018
82 posts
1.6 Years
I'm almost sure that you meant E0 0B EB, but whatever, I tried all the cases (both with 0B and B0, replacing and not). All of them didn't work.

I was thinking about FR's version. I'm using the one that is compatible with PGE, I'm not sure if that's the reason. Have anyone else been successful to make Snow Warning work on Fire Red?
You were right about the 0B, sorry I have been doing this conversation via mobile. I tried inserting snow warning yesterday but it froze. Give me a day or 2, I'm done half assing this lol. I'll look through MRDS's rombase and see how it's added. I'm pretty sure I can get it to work. Will touch base soon!
Male
California
Seen August 11th, 2018
Posted July 27th, 2018
82 posts
1.6 Years
MRDS was right about replacing that hex. Heres it working for a clean rom(for some reason it doesnt work with mine :/)

Step 1: Delete your file and extract clean rom from rar (this ensures you have no new data) or delete all hex you have added.

Step 1.5: Go into PGE and expand ability table. I recommend selecting delete old data.

Step 2: Add the following code at the provided offsets. If you want to change the data location, youd have to change this hex code but i dont think youre ready for that so just put it where i label for ease.
Spoiler:

1A140: 00 48 00 47 91 99 90 08

909990: 08 78 2D 28 01 D1 10 4A 10 47 6F 28 01 D0 0F 4C 20 47 0F 4A 11 88 80 20 08 40 00 28 01 D0 00 F0 0D F8 80 20 10 80 0B 4A 00 20 10 70 0A 48 00 F0 07 F8 0A 48 51 46 C1 75 00 F0 04 F8 08 4C 20 47 08 4A 10 47 08 48 00 47 AD A2 01 08 49 A1 01 08 1C 3F 02 02 48 3F 02 02 D0 9A 90 08 C4 3F 02 02 AB BB 01 08 25 BC 01 08 5B BB 01 08

909AD0: 39 20 00 2E 20 C0 03 02 00 2E 21 C0 03 03 9B 2E 22 C0 03 02 90 2E 23 C0 03 02 08 10 84 01 3A 45 07 0D 00 00 00 00 41 DC 92 1D 08 3F FF FF FF FF FD 13 B4 E7 00 FD 1B FE E1 D5 D8 D9 00 DD E8 00 DC D5 DD E0 AB



Step 3: Go into pge and rename slot 111 to Snow Warning. MRDS chose 6F(or 111) for his rombase(where i pulled this data). You *Should* be able to change it by changing the 6f in the first line on 90999A to whatever you want but i havent tested it to make sure thats the right location.

If you have any problems, feel free to let me know! :)

EDIT: Incase you dont know, CTRL + C(copy..duh) but in your hex editor(i recommend hxd) CTRL+B(paste, no CTRL + V)
Advertiser Content