Quick Research & Development Thread Page 10

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

sonic1

ASM is my life now...

Age 25
Male
Portugal
Seen May 29th, 2018
Posted November 30th, 2012
79 posts
12 Years
Ok, sorry, my bad, the script doesn't work, and i don't know why. In the past months i only worked with ASM, so i'm a but rusty with scripts. Here's a routine.
Try callingasm this routine:
.align 2
.thumb

main:
	push {r0-r4, lr}
	ldr r0, =0x3E8 			@flag base
	ldr r1, =0x0			@counter
loop:
	cmp r1, #0xBE
	bhi end
	add r1, r1, #0x1
	bl clearflag
	add r0, r0, #0x0		@next flag
	b loop
end:
	pop {r0-r4, pc}
	
clearflag:
	ldr r4, =0x0806E6A8+1          @clearflag routine offset
	bx r4
Hope this helps.
This signature has been disabled.
over 350px high
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Male
Seen 23 Hours Ago
Posted April 11th, 2020
1,315 posts
13.1 Years
I figured out how to edit the Hoenn Dex order in Ruby, without editing the National Dex. The offset is at 0x1FC84C. It does not list by Pokemon index number, it lists by dex entry index number. Treecko's index number is 277, but Treecko's dex entry number is 252. Which is why the byte at the offset I listed is FC. Changing the bytes here will change the Hoenn Dex while keeping the National Dex intact.

I suspect the same table exists in Emerald, and the bytes should be exactly the same.

EDIT: Hacked the Hoenn Dex to something similar (but not exactly the same) to a listing I'm planning on using in a future hack:

Sole developer of STARLIGHT LEGACY intended to be released on Steam.

Discussion: https://www.pokecommunity.com/showthread.php?t=432051
Discord: https://discord.gg/fTS5Q78
Twitter: https://twitter.com/jmatz1995

sonic1

ASM is my life now...

Age 25
Male
Portugal
Seen May 29th, 2018
Posted November 30th, 2012
79 posts
12 Years
I figured out how to edit the Hoenn Dex order in Ruby, without editing the National Dex. The offset is at 0x1FC84C. It does not list by Pokemon index number, it lists by dex entry index number. Treecko's index number is 277, but Treecko's dex entry number is 252. Which is why the byte at the offset I listed is FC. Changing the bytes here will change the Hoenn Dex while keeping the National Dex intact.

I suspect the same table exists in Emerald, and the bytes should be exactly the same.

EDIT: Hacked the Hoenn Dex to something similar (but not exactly the same) to a listing I'm planning on using in a future hack:
Yup, that table exists in Emerald, it's located at 0x31DFB8
For any ruby/firered to emerald equivalents, you can ask me, as i'm a emerald hacker.
This signature has been disabled.
over 350px high
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Male
Seen 23 Hours Ago
Posted April 11th, 2020
1,315 posts
13.1 Years


Yup, that table exists in Emerald, it's located at 0x31DFB8
For any ruby/firered to emerald equivalents, you can ask me, as i'm a emerald hacker.
Do you know where the limiter that limits the Hoenn Dex to 202 entries is though? It would be nice if we could expand it. It shouldn't require any ram repointing because the maximum amount of entries that the ram allows is 386.

Sole developer of STARLIGHT LEGACY intended to be released on Steam.

Discussion: https://www.pokecommunity.com/showthread.php?t=432051
Discord: https://discord.gg/fTS5Q78
Twitter: https://twitter.com/jmatz1995

Jambo51

Glory To Arstotzka

Male
Seen January 28th, 2018
Posted December 6th, 2015
732 posts
10.9 Years
For anyone interested, in FR US 1.0 (aka BPRE 1.0), to change your Pokédex "mode" to the style which DPPt used (That is, to have the seen amount displayed in the continue screen and the save screen instead of the caught numbers), change:

0800CF56: 00 20
0800CF64: 00 20
080F803C: 00 20
080F8044: 00 20

It really is that simple. :)
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

Haru~

Can't resist the chubbiness :3

Female
Seen July 15th, 2012
Posted June 23rd, 2012
16 posts
8.2 Years
Hello guys! :)

Does anyone know the RAM location for the player's current money, if any?
I've been messing with the memory viewer but I can't see it unless I access the trainer card, 0x02000490. But I want to know where the data is when you're not viewing the card.

EDIT: Oh, it's for BPRE. Silly me! ^^
Male
Seen 23 Hours Ago
Posted April 11th, 2020
1,315 posts
13.1 Years
stuff
So glad I found this, thank you! I've been thinking of figuring out how to make my own callasm command for battle scripting, but you've just saved me some work!

Sole developer of STARLIGHT LEGACY intended to be released on Steam.

Discussion: https://www.pokecommunity.com/showthread.php?t=432051
Discord: https://discord.gg/fTS5Q78
Twitter: https://twitter.com/jmatz1995
Age 23
Male
Seen February 7th, 2014
Posted July 8th, 2013
37 posts
10 Years
For the setmapfooter command/script in XSE, you're required to know the map footer for the map. Some people suggest subtracting the map footer table from the pointer to map footer offset, but there's a much easier way. I also think that method only works with Emerald, because since no one has posted the map footer table for Fire Red on these forums, I had to reverse find the "table," but using that number did not work with other maps than the map that I used to reverse find it. I probably checked my math, offsets, and pointers countless times, and I'm positive that method doesn't work with Fire Red.

This, however DOES work with Fire Red, along with Leaf Green, Ruby, Sapphire, and Emerald.
1. Go into Advance Map.
2. Choose a map you want the setmapfooter command to work with.
3. Go to header.
4. CTRL+H for professional settings.
5. Find the 19th byte in the Map Header (long strand of bytes under Map Settings)
6. That 19th byte is what you will use.

Haru~

Can't resist the chubbiness :3

Female
Seen July 15th, 2012
Posted June 23rd, 2012
16 posts
8.2 Years
After a long battle with cancer trying to find the RAM location of the player's money, I had a feeling that it is encrypted somewhere in the RAM and that's why I can't find it. So after going to my local POKeMART, I found a little routine that seems to decrypt something. After doing further testing, I made this routine to get the player's current money using the game's own code.

The routine:
Spoiler:

.align 2
.thumb

/*This routine does all the hard work in retrieving your current
money and stores it in vars 0x8000 and 0x8001.
	0x8000 - Lower half
	0x8001 - Upper half
*/

main:	push {r4-r6, lr}
	ldr r6, .DMA_MAP
	ldr r0, [r6, #0x0]
	mov r5, #0xA4
	lsl r5, r5, #0x2
	add r0, r0, r5
	ldr r1, .OTHER_RAMLOC
	ldr r1, [r1, #0x8]
	bl get_amount		/*Does the actual decrypting*/
	ldr r1, .VAR_8000
	str r0, [r1]
	pop {r4-r6, pc}

get_amount:	ldr r4, .DO_CALC
		bx r4

.hword 0x0000
.DMA_MAP:	.word 0x03005008
.OTHER_RAMLOC:	.word 0x02039934
.VAR_8000:	.word 0x020370B8 /*Var 0x8000-0x8001*/
.DO_CALC:	.word 0x0809FD59


I slept after that...
Age 23
Male
Seen February 7th, 2014
Posted July 8th, 2013
37 posts
10 Years
What I've noticed is that when you insert a map, you are not able to ride the bicycle on that map even if you edit all of the header settings for the map. The solution to this lies in the string of bytes for the map header.

1. In Advance Map, go to the map header and enter the professional map header settings with CTRL+H.
2. In the string of bytes for the map header under "Map options:," find the first of the last four bytes (byte #25 if that confuses you).
3. Change that byte (byte #25) to 01.
4. You can now ride the bicycle on that map!

looper

German Hacker

Male
Germany
Seen September 9th, 2013
Posted September 3rd, 2012
53 posts
9.8 Years
Did someone ever thought about more characters than the two genders in FR? For example 2 boys and 2 girls?
In my eyes it would need a change of the choice in the intro and a modification of the scripts that renders the trainerbattles (backsprite) and the maps (OW) as like some minor things.
My Question is: Would it be possible with a small amount of work? I don't know how the routines that differ the gender work, but thinking about the checkgender command gives me the feeling that the game only allows 2 Values.

Does anyone know sth. about it?
I'm not a god. But Chuck Norris isn't, too.

redriders180

Mastermind of Pokemon Glazed

Male
Path of Victory, Tunod
Seen December 17th, 2016
Posted November 17th, 2015
540 posts
9.9 Years
Did someone ever thought about more characters than the two genders in FR? For example 2 boys and 2 girls?
In my eyes it would need a change of the choice in the intro and a modification of the scripts that renders the trainerbattles (backsprite) and the maps (OW) as like some minor things.
My Question is: Would it be possible with a small amount of work? I don't know how the routines that differ the gender work, but thinking about the checkgender command gives me the feeling that the game only allows 2 Values.

Does anyone know sth. about it?
It definitely would be alot of work. You could use a small shortcut, however, and take a leaf out of JPANs book and make a backsprite-switching and OW switching command. This would get around the OW and backsprite problem, although there are many other things that aren't addressed in JPANs hack engine, such as the small sprite of the player's head that shows up on the World Map, the end credits script, and plenty of other things. You could always modify the ASM behind the main part of the ROM that holds the player's gender, which according to my notes is at 0x0300500C + 0x8, to hold other values. Currently, it only uses 0 for boy and 1 for girl, but I'm sure you could make it accept other values with some ingenuity. But you'd need to go to every single routine in-game that depends on gender, and change the routine to have more branches. Alot of things change color depending on the gender, in addition to other things. If you're experienced enough to take it on, by all means, go for it :D, otherwise, try pursuing a simpler path. For instance, after Oak's intro, ask the player, in a script, if they'd like to be Type A boy or Type B boy, or Type A girl or Type B girl, and adjust the variables accordingly.


I think I'm done with ROM hacking. I'll still pop in and visit, though.


Platinum Lucario

The Legendary Master of Light!

Age 27
Male
Warrnambool, Victoria, Australia.
Seen 2 Weeks Ago
Posted April 13th, 2020
1,603 posts
12.4 Years
Hm... I've actually found the name input screen graphics in a/1/1/9 on a Pokémon Black 2/White 2 ROM. And then I found the name input screen graphics in a/1/1/8 on the first Pokémon Black/White ROMs. But when I try to insert the name input graphics from Black into Black 2... here's what happens, the graphics may be changed... but the characters and the cursor position haven't changed, so I'm actually wondering where the data for the name input screen and cursor position are... so then I can then replace the data from the first Black Version into Black Version 2.
[Platinum Lucario's Signature]
If you need to disable my signature, please give me advice on how to improve the CSS-DIV code. Thank you!
All credits for the avatar since 2008 goes to shorty-antics-27 (fanart account)! Thank you! ^^
Signature Status: Strikes: 1/3 | Infractions: 0/3
It's time to change the future...
to a positive direction!
Let's prevent things from getting bad!

I'm a ROM and ISO Researcher

Current Project: Researching Pokémon Mystery Dungeon Adventure Squad games (WiiWare)
Male
Seen August 15th, 2012
Posted August 9th, 2012
4 posts
7.8 Years
I recently replaced the battery in my old Ruby Version cart, as it had run dry due to age. Some things have been working fine since the replacement (clock's running, Shoal Cave works like it's supposed to). Other things, however, are displaying symptoms very reminiscent of the old Berry Glitch that used to plague Ruby & Sapphire versions (berries won't grow, lotto tickets don't work). Now, I can't imagine the R/S/E programmers devoting much effort to elegantly restoring all the RTC related functionality after a dry battery has been replaced so finding these glitches after going through the effort to repair my cart are kind of disappointing but unsurprising.

I'm wondering about the feasibility of dumping my save using a tool like GBA_Backup_Tool and using some hacking tools to determine what's gone wrong with my save, perhaps comparing it with a healthy save, then fixing it and dumping it back to the original cart. Has fixing a bug like this ever been tried before?

Gamer2020

Accept no Imitations!

Male
Distant Land
Seen April 5th, 2020
Posted January 6th, 2019
942 posts
12 Years
I recently replaced the battery in my old Ruby Version cart, as it had run dry due to age. Some things have been working fine since the replacement (clock's running, Shoal Cave works like it's supposed to). Other things, however, are displaying symptoms very reminiscent of the old Berry Glitch that used to plague Ruby & Sapphire versions (berries won't grow, lotto tickets don't work). Now, I can't imagine the R/S/E programmers devoting much effort to elegantly restoring all the RTC related functionality after a dry battery has been replaced so finding these glitches after going through the effort to repair my cart are kind of disappointing but unsurprising.

I'm wondering about the feasibility of dumping my save using a tool like GBA_Backup_Tool and using some hacking tools to determine what's gone wrong with my save, perhaps comparing it with a healthy save, then fixing it and dumping it back to the original cart. Has fixing a bug like this ever been tried before?
I think this is more of a question then actual research but I shall answer it anyway. I recall R/S had some problem making it so that time based events would stop work properly after a year. They did later on have ways to fix this. You can link it up to XD gale of darkness and it will fix it I believe. Also you can link it up to FR/LG and do something and it will also get fixed. I can't remember if Emerald does the same or if Colosseum had a fix. Google and research it, I can tell you there is definitely no need to dump your save.
Male
Seen August 15th, 2012
Posted August 9th, 2012
4 posts
7.8 Years

I think this is more of a question then actual research but I shall answer it anyway. I recall R/S had some problem making it so that time based events would stop work properly after a year. They did later on have ways to fix this. You can link it up to XD gale of darkness and it will fix it I believe. Also you can link it up to FR/LG and do something and it will also get fixed. I can't remember if Emerald does the same or if Colosseum had a fix. Google and research it, I can tell you there is definitely no need to dump your save.
Perhaps I should clarify- I did those patches ages ago, hence my referring to the "old Berry Glitch," as it's not a glitch that should be around any more. This is a copy of Ruby version that I've owned since 2003-2004 and it has done plenty of trading with FR/LG carts and with Colosseum on the same save that still exists. I even tried loading the patch program in my copy of FR and patching the game just in case I somehow managed to avoid getting the patch after all, and the Ruby cart comes up with an "Unable to update" message which I can't imagine is indicative of anything other than that it's already been updated.

The weird thing that's going on here, and the reason I gravitated towards the Research forum and started thinking about dumping my save (which I've done now, I'm just too inexperienced/stupid at hex-editing gba saves for the moment to actually do anything with the dumped save other than play it in VBA), is that I've somehow managed to replicate the effects of a glitch that should have been patched out of the game years ago. The obvious answer to "how" is that I'm experiencing continuing effects of the battery running dry despite putting in a new battery because the game doesn't know how to restart particular features after they've broken due to the battery (not due to the aforementioned glitch that Nintendo patched out themselves) and I want to research exactly what happened. There's one person in the Gen III Q&A thread who's mentioned experiencing the same issue under the exact same circumstances but overall it's not something that's been documented because the rare folks who actually change the dry lithium cells in their RSE carts mostly seem to just start new games once they do so.

What I want to do with the save file I've dumped is unpackage it and take a look at what's going on with the Loamy Soil data using a hex editor and see if there's anything insane going on with the minutes remaining variables for my berry bushes or if there's anything else amiss. Right now I lack the means to unpackage it though there's plenty of useful reference information on Ruby/Sapphire save file data structure on furlocks-forest (which I can't link yet since the board software won't let me until I've posted more).

Alternatively, there's the possibility I'm a complete idiot and it really is something simple I can patch using official Nintendo stuff and I just haven't done enough Google research. Somebody talk me down from my insane scheme if you think this is the case.
Age 23
Male
Seen February 7th, 2014
Posted July 8th, 2013
37 posts
10 Years
Some fun music hacking info..
There are fanfares (I guess I'll call them that) and songs. The difference between them is that if you start a fanfare on one map and go to the next, the fanfare will overlap with the new music. It will sound like a blended mess. If you insert a music track that you want for a city or route over it, then it'll still keep the characteristics of the fanfare. This is not good because the music will blend if you go to another map. To fix this, you must find the track's pointer in the song table. This can easily be found by looking at the "Table" offset in Sappy. So, you have the pointer. There are four bytes after the pointer. 00 00 00 00 means it's a song. 02 00 02 00 means it's a fanfare. If you want to make a song a fanfare, vice versa, then you change the bytes to what you desire. Now, you can replace the futile "You Fail It" tracks with great route music, or some other fanfare you want to replace.

Also, make sure you do this for every song table you have. You only have one if you haven't made another, by the way. :D

redriders180

Mastermind of Pokemon Glazed

Male
Path of Victory, Tunod
Seen December 17th, 2016
Posted November 17th, 2015
540 posts
9.9 Years
I didn't think this warranted an entire thread, mainly because I'm sure someone else has figured this out by now.

In Gen V games, the stat calculations system was overhauled, and stats are recalculated after every battle. This is all well and good, and I wouldn't touch it in any case, but one thing caught my eye...Deoxys's stats are calculated after every battle as well, even in Gen III. Only Deoxys. Why would they waste such a perfectly good system for ONLY Deoxys? I expect it's because of the forme-changing, but they could've expanded the system for everything!

Surely, since the system is already in place, it's a very simple matter to change it from affecting just one Pokemon to affecting all of them. Does anyone know anything about what someone might be able to do to fix this?


I think I'm done with ROM hacking. I'll still pop in and visit, though.


looper

German Hacker

Male
Germany
Seen September 9th, 2013
Posted September 3rd, 2012
53 posts
9.8 Years
Quick Question:
Thanks to pichu2000's Tutorial I know that the data that links the data (maps, events, scripts and texts) is stored in the file a/0/1/3. Where is the data stored in DPP / HGSS?
And a second question: Are the commands used for scripting the same in DPP and HGSS?
I'm not a god. But Chuck Norris isn't, too.

tajaros

Hi I'm dawg

Age 21
Male
Philippines
Seen August 7th, 2015
Posted April 15th, 2013
856 posts
8.1 Years
Hey guys I have a question, do you guys now where the Trainer Card Sprite Table is?

I wan't to repoint the sprite being loaded when your male and change it to another number for example sprite #90...

I would appreciate if you guys can help me, and I know that there's a command in Jpan's Engine but I wan't to do it without applying the patch so can you guys help me?

NOTE: This is for the male sprite I don't need to repoint the Heroine sprite... :)
Male
Seen September 9th, 2012
Posted September 7th, 2012
2 posts
10.4 Years
Hey, I'm not sure if this'll be noticed, but I'm givin' it a shot:

Does anyone know the location of either A) the code that makes Mew and Deoxys use/set the obedience bit, or B) the area that performs the check for the obedience bit in Pokemon Emerald? I'm planning on sprucing up my Pokemon Emerald Randomizer program, and I'd love to get that issue out of the way, as randomized wild pokemon imply possible legitimate Mew and Deoxys usage.

I've searched the forums and found a solution to fix wild Mews' obedience bit in FR/LG, but couldn't find Deoxys and additionally couldn't find anything similar in Emerald's code. Granted, I'm really lost in terms of ASM without a decent GBA debugger, but any help on this matter would be greatly appreciated. I've done ASM hacking on GBC before, so I'm not afraid to get my hands dirty. I figure that it's a simple replacement of a few bytes with NOOP, assuming the location of the check is known.

Lookin' forward to a response, I hope! Thanks for taking a peek. :)
Male
Seen November 2nd, 2016
Posted January 9th, 2013
94 posts
9.9 Years
Hey, I'm not sure if this'll be noticed, but I'm givin' it a shot:

Does anyone know the location of either A) the code that makes Mew and Deoxys use/set the obedience bit, or B) the area that performs the check for the obedience bit in Pokemon Emerald? I'm planning on sprucing up my Pokemon Emerald Randomizer program, and I'd love to get that issue out of the way, as randomized wild pokemon imply possible legitimate Mew and Deoxys usage.

I've searched the forums and found a solution to fix wild Mews' obedience bit in FR/LG, but couldn't find Deoxys and additionally couldn't find anything similar in Emerald's code. Granted, I'm really lost in terms of ASM without a decent GBA debugger, but any help on this matter would be greatly appreciated. I've done ASM hacking on GBC before, so I'm not afraid to get my hands dirty. I figure that it's a simple replacement of a few bytes with NOOP, assuming the location of the check is known.

Lookin' forward to a response, I hope! Thanks for taking a peek. :)
FR Obedience checks:
Deoxys: 0x0801D3EC
Mew: 0x0801D402

There ya go.