The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.


Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #51    
Old August 9th, 2011, 12:08 AM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
Hello, I'm (marginally) back for the time being. I see my "perfect" patch wasn't perfect after all but this within itself is a misdemeanor because nothing programmers ever come out with is truly perfect, EVERYTHING will always have bugs, even the more professional of applications.

But enough about that, let's work on the responses.

Quote:
Originally Posted by Putin View Post
Around the time you came out with this, I was already working with it in the same way (comparing the Japanese Touhoumon Renkou version and an unpatched Japanese rom), so I may try that again (or take a closer look at what you've taken note of). If I find anything, I will post it here, but you've done pretty much as much as I expected to be able to (get a buggy version working).
This is exactly what I did so I think the most I did for you was save you about 5-ish hours of work and thorough testing. From what I've seen and played, the Japanese revision of the code that adds the system is indeed well put together, as none of the bugs posted in this thread are apparent in the Japanese ROM, which leads me to believe that more then just the registry values and memory positions are different between the hard coded mechanics of the US and the JP ROMs.

The "Minus" bug truly baffles me; I can't think of a reason why it would do this. If the Plus ability isn't bugged but Minus is, then my patch might have altered the position of Minus' code, which is causing the game to crash because the pointer to Minus' code is now incorrect. I'm not sure how this could actually be possible though, so don't quote me on this. It still confuses me.

Flash Fire, however, I can explain. Flash Fire's code references the edited part of the mechanics as part of bypassing the damage. Flash Fire is meant to make the Pokemon immune to Fire moves, so in order to do this, it references the damage dealing code; which this patch edits. Fixing Flash Fire means changing the address that Flash Fire's code references so that it can properly bypass defense. It's relatively easy to do so long as you know where Flash Fire's code is; I don't know it personally however. Once you know, it's just a matter of comparing an unpatched ROM to the patched one and finding the values that Flash Fire's code references.

no$gba has far from perfect emulation. From what I remember, the version of touhoumon that I grabbed this code from doesn't work in no$gba either. Suffice it to say, you sacrifice some compatibility in using this patch. If you had the debugger version of no$gba though, with some ASM knowledge, it's quite possible to make a patch that is compatible with it.

The Japanese continue to impress me. I was never aware there were DPSS versions of Touhoumon Emerald. Unless Putin wants to give a whack at it this time, I could very well cross compare both those patches and make a DPSS patch for Emerald. It'll likely contain the same bugs, or possibly new ones, however, which is a job for a good ASM hacker. I'm merely here for the boring jobs no one else wants to do. ;o
Reply With Quote
  #52    
Old August 16th, 2011, 06:45 PM
Putin's Avatar
Putin
Anspruchsvolle Narr
 
Join Date: Dec 2010
Location: Florida
Gender: Male
Nature: Brave
Hey, good to see you back. I didn't work on this like I said I would because some pretty serious real-life stuff came up (and is still up), but I will get to it when I get to it, if someone doesn't get there first.
Reply With Quote
  #53    
Old September 2nd, 2011, 04:42 PM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
Man. I tried cross comparing the (U) and (J) versions of the Emerald ROM only to find out that neither of them are really similar. I even looked in the VBA debugger, the same exact spots in the mechanics both use entirely different coding. Changes in code between the (J) and (U) versions of Emerald are not interchangable because of this so getting DPSS into Emerald is probably going to take a lot of additional work, unless I'm missing something.
Reply With Quote
  #54    
Old September 3rd, 2011, 05:56 AM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Correct me if I'm wrong, but I could only find one relevant check in the entire ROM for the class of the attack (as there was no class split outside of battles at all).

I'm struggling to understand the relevance of all the code you hacked in, since the only thing we're changing is how the game determines what attack falls into which class. Regardless of how a move actually works, all we want to change here is the type-based class system into a byte in the move's data based system. Is this correct?

If so, the mechanics for special. atk/def and atk/def already exist within the game. There doesn't seem to be any need whatsoever to hack those mechanics. All we need to do is change the one check, so that it reads the byte in a different way. As an ASM hacker, I can assure you from experience that the rest of the changes are pretty much irrelevant.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
  #55    
Old September 3rd, 2011, 08:44 AM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
I have no idea if ANYTHING you said is true or not. All I know is that if I change the hexidecimal bytes in the (U) ROM of Fire Red to match those of the (J) ROM at the appropriate places then it works. I don't know why it works; I just know it works because I tested it before. I never actually experimented with any other changes because I'm no ASM hacker.

If you believe in such things, then why not demonstrate it? Pitch in, help us, this isn't one person trying to do something for their own personal gains, I want this to be a community effort that all of the community in whole can benefit from. I've said this multiple, multiple times, but the perfection of the patch can only be achieved with an experienced ASM hacker and I am not one of them, so any help is greatly appreciated not just by me, but anyone who uses this patch to make their hack better.
Reply With Quote
  #56    
Old September 6th, 2011, 05:07 AM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Quote:
Originally Posted by JJames19119 View Post
I have no idea if ANYTHING you said is true or not. All I know is that if I change the hexidecimal bytes in the (U) ROM of Fire Red to match those of the (J) ROM at the appropriate places then it works. I don't know why it works; I just know it works because I tested it before. I never actually experimented with any other changes because I'm no ASM hacker.

If you believe in such things, then why not demonstrate it? Pitch in, help us, this isn't one person trying to do something for their own personal gains, I want this to be a community effort that all of the community in whole can benefit from. I've said this multiple, multiple times, but the perfection of the patch can only be achieved with an experienced ASM hacker and I am not one of them, so any help is greatly appreciated not just by me, but anyone who uses this patch to make their hack better.
Please don't think I was trying to suggest you were having a go at me, because I wasn't. I was genuinely impressed with the effort you put into the patch, even if you didn't truly understand why you were changing stuff.

As far as I can tell, however, most of the patch is entirely unnecessary.
I was actually asking for people to back up my theory, as if I was right, then it only takes a simple small routine, rather than a large patch.

The Physical/Special split has existed since Generation 1, has it not? (It wasn't based on an attack by attack basis of course, but used the type to determine it). My theory is that the code needed for the actual mechanics of it has always existed in the ROM, but that the split was done "wrong", so I simply modified that one check rather than all of the mechanics.

I haven't released it yet because I'm still testing it along with the rest of the 649 Patch (Moves, abilities and everything else too). Once I'm sure it's bug free, I'll release it, but not before.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
  #57    
Old September 6th, 2011, 05:19 AM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
It's okay, don't mind me, I'm just an avid follower of the prospect that people back up their claims, though if you're not sure yourself then that's understandable.

If you're working on a patch yourself that does this already then it'll likely be ten times more effective then my patch as it'll be developer brewn by someone in this community (and more importantly, someone who speaks english) and won't rely on wild mass guessing. I'm sure I've made this disclaimer too many times to count already but the patch I've made is based entirely off of assumed hex code that I only know works because I've personally tested it. I really don't have any idea how it actually works because I'm horribly unskilled in ASM; obviously a patch made by someone competent at ASM will work infinitely better then a patch made by someone who's working off of pure trial and error, so I will be exceedingly thankful myself, if everyone else wouldn't be, for your patch, so lots of good luck to you on that.

tl;dr: I will stop acting like a dork now. :V
Reply With Quote
  #58    
Old September 17th, 2011, 01:20 AM
treeckopa
Beginning Trainer
 
Join Date: Dec 2008
Location: Hong Kong
Gender:
Is it now possible to implement the class split into Emerald?
Where can I find the offsets of all the moves in Emerald?
Reply With Quote
  #59    
Old September 25th, 2011, 05:40 PM
Big_Bad_Lith
Beginning Trainer
 
Join Date: Sep 2011
I made an account just so that I could bump this topic.

I desperately want the physical/special split in english rom hacks, with all my heart. I have little experience, but I think I can see what Jambo was getting at.

In the code, there must be something like this:

Pokemon_attacks{
If(move.type = fire){
use_special_atk()
}
if(move.type = fighting){
use_physical_atk()
}
etc
etc
}

and what we want to do is make it so that it goes like this:

Pokemon_attacks{
If(move.split = special){
use_special_atk()
}
if(move.split = physical){
use_physical_atk()
}
}

First we have to find where in the code this actually happens. after that, we'd need to find a way to assign the binary variable "split" to a move. I propose we could use the "makes contact" variable. Sure, moves like earthquake would make contact suddenly, but that's a small price to pay for the glory of a physical/special split.

It would look something like this:

Pokemon_attacks{
If(move.contact = no){
use_special_atk()
}
if(move.contact = yes){
use_physical_atk()
}
}


I realize that the actual code probably looks more like the matrix than javascript, but something analogous to what I suggest ought to exist somewhere in that mess. I'd help if I could, but I have no idea where to start.

PLEASE, people who know their way around code, MAKE THIS A REALITY.
Reply With Quote
  #60    
Old September 25th, 2011, 06:00 PM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
First of all, ASM is not that simple. Variables don't just come and go like that, if there's not enough room for a value in the registers, then you've got a problem.

More over, there's no need to use the contact byte in the attack data because there's enough space in the data struct to allow three more values that can reach 255, which is more then what we need since all we really need is just a boolean. The contact byte can stay the same so long as the code can be altered to take advantage of the new flag in the struct, which is what my patch for Fire Red does, albiet in a highly messy and unoptimized way. But what this means is that it's most certainly possible.
Reply With Quote
  #61    
Old September 25th, 2011, 07:14 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Here's the hack for Emerald that I whipped up in about an hour. The little testing I did shows it to be working fine, but who knows. At least it's a base for someone. It uses the same byte as the FireRed hack (the second padding byte.)

kthx

Code:
0804674E: 80 7A
080695E8: 80 7A
08069A5A: 00 29
08069A5C: 00 D0
08069BC4: 01 2F
08069BC6: 00 DC
08069BCC: 01 28
08069BCE: 00 D0
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #62    
Old September 25th, 2011, 07:31 PM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
You made it working with just those bytes alone?

I seriously can't doubt Jambo now.

Can someone test whether or not the bugs with my patch are still present in that change? I wanna find out if the bytes I copied were faulty or if it's the ROM itself. I'll make an IPS patch for Emerald for anyone too lazy to pick up a hex editor and do it themselves.

Edit: Man, looking back on it, it feels silly to upload a 41 byte file but...

http://srpgp.supersanctuary.net/emerdpss.ips

Does NOT include any attack data structure support. You will have to edit in actually changing the moves' phys/spec classification yourself.

Last edited by JJames19119; September 25th, 2011 at 08:01 PM. Reason: hurr ips posting
Reply With Quote
  #63    
Old September 25th, 2011, 08:23 PM
Big_Bad_Lith
Beginning Trainer
 
Join Date: Sep 2011
please excuse my ignorance, I am the newest of noobs. How can I access the move data? What do I do with the ips file?

also thank you very much everyone for working on this.
Reply With Quote
  #64    
Old September 25th, 2011, 08:46 PM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
Changing the moves requires some form of hex editing and a LOT of patience and time. I suggest looking here.

The IPS file is a patch. It's obvious you haven't dealt with ROM hacking for very long so I just suggest looking up "IPS Patch" on Google and waiting for someone to post another patch that deals with all the moves. I'd do it myself but I'm probably going to be testing and making sure this works (and hoping I'm not embarrassing myself and falling for a trap or something)
Reply With Quote
  #65    
Old September 25th, 2011, 09:53 PM
Big_Bad_Lith
Beginning Trainer
 
Join Date: Sep 2011
turns out I'm not only new, I'm also impatient and foolhardy.

I got the ips patch thing done.
I found a hex editor, and know what byte I should be changing, and I found where the moves start (at pound), but I don't know what all the moves are.

Is there some sort of table that shows this, similar to the fingerprint section in the link you posted? or at least a list of all the moves in order, so that I can go down the list and see which ones I want to make special or physical.

thanks in advance!
Reply With Quote
  #66    
Old September 25th, 2011, 09:56 PM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
This page actually lists all the move by their index number very helpfully, so this will help you in your endeavor. Good luck!
Reply With Quote
  #67    
Old September 25th, 2011, 11:35 PM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
What about showing the little category image where necessary? Does anyone understand the code well enough to be able to draw an extra image on the screen. At the moment, the split is completely hidden from the eyes of the player.

To that end, I set all status moves on my patch as category 2 rather than 0, as status moves should never directly harm the opponent, this works as the damage calculation routines are never called when using the status moves.

Obviously, the plan would be to store the images somewhere in the Rom and when using them, check the category byte to get the correct image. Thing is, this requires us to know the game's procedure for writing images to the screen.

Thoughts?
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

Last edited by Jambo51; September 25th, 2011 at 11:39 PM. Reason: Spelling on iPhone is hard...
Reply With Quote
  #68    
Old September 26th, 2011, 01:30 AM
treeckopa
Beginning Trainer
 
Join Date: Dec 2008
Location: Hong Kong
Gender:
I've found a DPSS patch for Japanese Emerald
After patching it to a Japanese Emerald, I've found the following:

The left one is the patched one and the right one is the original one.
It shows a few lines only...

For the first line, we can locate "00 06 00 28 07 D1 6E 20 41 46 41 43 08" at around 0x03D060 in an English Emerald.
I think it's possible to change the "6E" to "64", and then modify the rest using the same method....

Actually I don't know if that works, but a Chinese hacker has successfully implanted DPSS into an English Emerald. It may be a possible way to implant DPSS into an English Emerald, though it's quite troublesome...

Here I've attached the DPSS patch for Japanese Emerald. Hope that it can help.
Attached Images
File Type: png 123.png‎ (57.2 KB, 538 views) (Save to Dropbox)
Attached Files
File Type: ips SkillToDP(EM).ips‎ (2.4 KB, 21 views) (Save to Dropbox)
Reply With Quote
  #69    
Old September 26th, 2011, 03:33 AM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
Quote:
Originally Posted by treeckopa View Post
I've found a DPSS patch for Japanese Emerald
That's nice and all but I tested this post's changes and they work quite perfectly. Without the same bugs as my fire red patch too.
Reply With Quote
  #70    
Old September 26th, 2011, 06:55 PM
Big_Bad_Lith
Beginning Trainer
 
Join Date: Sep 2011
Quote:
Originally Posted by JJames19119 View Post
That's nice and all but I tested this post's changes and they work quite perfectly. Without the same bugs as my fire red patch too.
do they? I don't mean to be rude to either you or Dathatron, but when I put the patch onto a fresh copy of emerald, the damage got waaaay too low!

I was dealing maybe 1 or 2 points per hit, against the very first lv. 2 Zigzagoon! And I'm sure it isn't my messing around with the hex tables, because like I said, I tried it on a completely fresh copy. and even when I then went in and cranked up scratch's base power and Torchic's attack stat, it still did little damage!
Reply With Quote
  #71    
Old September 26th, 2011, 06:59 PM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
I just tried it myself. It works just fine. Even repatched my IPS file onto a fresh copy myself, it works exactly as it should. Are you sure your copy hasn't been fiddled with?
Reply With Quote
  #72    
Old September 26th, 2011, 07:42 PM
Big_Bad_Lith
Beginning Trainer
 
Join Date: Sep 2011
I just re-downloaded both the rom and the patch - same result as before. Could you upload a pre-patched version, ie, a copy of what you just got working properly?
Reply With Quote
  #73    
Old September 26th, 2011, 07:59 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by Big_Bad_Lith View Post
do they? I don't mean to be rude to either you or Dathatron, but when I put the patch onto a fresh copy of emerald, the damage got waaaay too low!

I was dealing maybe 1 or 2 points per hit, against the very first lv. 2 Zigzagoon! And I'm sure it isn't my messing around with the hex tables, because like I said, I tried it on a completely fresh copy. and even when I then went in and cranked up scratch's base power and Torchic's attack stat, it still did little damage!
Like I said, I did it in about an hour, and I only tested it with Pound. So it's very possible I broke something. I'll have a look at it soon.

And you weren't being rude. But the values are 00 = Physical; 01 = Special; 02+ = Status; Anything that's given a value of 02 or higher will deal one damage.
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #74    
Old September 26th, 2011, 08:07 PM
JJames19119
Beginning Trainer
 
Join Date: Oct 2008
Gender:
Quote:
Originally Posted by Big_Bad_Lith View Post
I just re-downloaded both the rom and the patch - same result as before. Could you upload a pre-patched version, ie, a copy of what you just got working properly?
I think maybe you should give a look at the rules if you're asking such a question.
Reply With Quote
  #75    
Old September 26th, 2011, 09:12 PM
Big_Bad_Lith
Beginning Trainer
 
Join Date: Sep 2011
Quote:
Originally Posted by JJames19119 View Post
I think maybe you should give a look at the rules if you're asking such a question.
ah, well then. I'll just wait for Darthatron and you other people who know what you're doing, then.
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 09:15 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 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 - 2014 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.