Quick Research & Development Thread
View Single Post
August 25th, 2013 (09:31 AM).
What happens if I push it?....
Join Date: Nov 2012
Location: Do you really want to know? Really?
Quote originally posted by
I don't think it would be a problem to expand the OW table or at least use some sort of switch to use an alternate table if needed. I did not try it though. I already have my code to change the OW. Actually as said i'm only hijacking the loader routine and switching out the parameter(which is passed by r0 or r1, not quite sure at the moment) to make the game load a different OW. It does not actually effect how the sprite is handled by the game, so if you load a sprite without running animation you won't have one, the game will just accept it as being the new hero OW. If you do load a sprite with a few extra frames it will be no problem eighter, they are just not used. Also if you replace the bike and use the bike routine one will be able to "ride" a pokémon. If it is needed you would also have to expand the OW table. In fact this is (i guess) regulated by a simple cmp opcode to check if the passed argument is greater than the fixed value, if it is, it handles it differently and I guess OWs over 255(1byte) will be killed by the standardized lsl lsr structures that classifies the argument as a byte value, leaving only the last 8 bit of the parsed value. If someone wants to increase the amount of OWs in the table he would have to a) repoint the table to somewhere in the rom, b) increase the parsed value to at least half-word size and c) bypass the compare that is used by the game to check wether the OW is one of the "special treated" ones. Maybe you could arrange it so that those won't get lost and you just load your real OWs above the byte border again. I don't know exactly what those few OWs are for, but I guess if you are able to keep them you always should because it's part of the main game.
I did once write a routine to at least use more than one OW table therefore I know that it's working, but I did not test to expand the current table at all. I just don't see any obstacles(I did not look at JPANs routines eighter, since they are all for Firered and I guess at least in the part of how the game handles overworlds those two have some differences, at least in FR OWs are also captable of executing scripts if the right sort of behavior byte is set, this is not the case in Emerald)
Well I guess i will try to use some sort of item first, for the moment I just can't come up with another solution probably it is also possible to implement some sort of "professional tamer" who allows you to "set" your saddle to a specific pokémon which of course can be "ridden" so you have an actual explanation for the player. Still using a ride move would be the best solution(in my opinion) but who knows what the future brings...
Edit: I guess if one expands the OW table he is also not able to use the new OW regularly on a map, at least advance map does not allow half word sized values. I don't know if this is also stored in byte form but it should'nt bother the game if it loads it from a dynamic ram adress like a in-game variable or something, you can basically store the "new bike" OWs and everything you do not need to use like regurarly on a map beyond the byte limit and your regular ows befor that. I don't know how JPAN worked himself arround this problem, I'm pretty sure advance map and other mapping tools won't support entrys beyond one byte if the map structure does not allow it. JPAN would have to hack the whole map structure which would make all the normal maps unuseable and the tools had to adapt themselves which is also unknown to me(Maybe i'm just uninformed)
View original post
JPAN's hack, in its entirety, enables up to 65000 and most of the routines taken exist in all Advance Gen games, especially the main loader, which is exactly the same. However, I have a better idea.
What I am seeing, if we continue with the bike, is a hack near the end of the routine which branches if the hero's bike is being loaded. At that point, we send it to check a var which will then read from a table and load the correct sprite. This, combined with my OW hack (simply for instaloading of palettes) would work well and wouldn't require an expansion of OWs.
Paired with Simba
Also Known As:
View Public Profile
Send a private message to karatekid552
Find all posts by karatekid552
Find threads started by karatekid552
Ignore Posts by karatekid552