Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Reload this Page Development: Pokémon Fire Red Hacked Engine

Notices
For all updates, view the main page.

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
 
Thread Tools
  #326    
Old February 2nd, 2011 (07:39 AM).
masterquestmq's Avatar
masterquestmq masterquestmq is offline
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Posts: 125
Still a problem (some scripts being deleted)

for the past 2 days my hack has been going well.. I took the advice of a hacker and started using offsets from 80000 and above.

However today when I was running through my hack i notice that one of the signpost script was deleted (this signpost was a 80000 and above offset). any idea why this happened? I notice that whenever I attempt a long apply movement script some small text script will go missing..

its really bugging me
can it be the rom?
a bug?
or its a common problem?
Reply With Quote
  #327    
Old February 2nd, 2011 (01:48 PM).
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
Quote originally posted by masterquestmq:
Still a problem (some scripts being deleted)

for the past 2 days my hack has been going well.. I took the advice of a hacker and started using offsets from 80000 and above.

However today when I was running through my hack i notice that one of the signpost script was deleted (this signpost was a 80000 and above offset). any idea why this happened? I notice that whenever I attempt a long apply movement script some small text script will go missing..

its really bugging me
can it be the rom?
a bug?
or its a common problem?
Were you using a dynamic offset for your scripts, or were you selecting the offsets manually?

Also, do you mean you're using offsets from 800000 or do you really mean 80000? If it's the latter, I'm sure the hacker meant to use offsets from 800000 - you could really do some damage to the rom by using offsets at 80000.
__________________
Reply With Quote
  #328    
Old February 2nd, 2011 (03:05 PM).
masterquestmq's Avatar
masterquestmq masterquestmq is offline
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Posts: 125
Quote originally posted by metapod23:
Were you using a dynamic offset for your scripts, or were you selecting the offsets manually?

Also, do you mean you're using offsets from 800000 or do you really mean 80000? If it's the latter, I'm sure the hacker meant to use offsets from 800000 - you could really do some damage to the rom by using offsets at 80000.
Sorry typo been using 800000 and dynamic in front of it.
so i start a script basically like this:

dynamic 0xoffset

could it be something else that's deleting minor scripts in my hack?
Reply With Quote
  #329    
Old February 2nd, 2011 (03:11 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by masterquestmq:
Sorry typo been using 800000 and dynamic in front of it.
so i start a script basically like this:

dynamic 0xoffset

could it be something else that's deleting minor scripts in my hack?
Do you have your ROM open in another program (other than XSE or Advance Map) when you make, insert and save the scripts? If you do, saving that program may be deleting all of your work as the new script pointers did not exist when you opened the program.
__________________
Reply With Quote
  #330    
Old February 2nd, 2011 (03:34 PM).
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
Quote originally posted by masterquestmq:
Sorry typo been using 800000 and dynamic in front of it.
so i start a script basically like this:

dynamic 0xoffset

could it be something else that's deleting minor scripts in my hack?
So just to make sure, a dialogue script you wrote would look something like this:

Code:
#dynamic 0x800000

#org @start
msgbox @message msg_face
end

#org @message
= Hi!
If you're doing everything about like that, I don't see why any scripts would be deleted. The only problems I've had with scripts being overwritten is when I would put in the offsets manually, instead of letting XSE's dynamic process locate them for me. I've been using the Fire Red Hacked Engine for my hack for some time without having encountered such a problem.
__________________
Reply With Quote
  #331    
Old February 2nd, 2011 (07:25 PM).
shinyabsol1's Avatar
shinyabsol1 shinyabsol1 is offline
Pokemon DarkJasper!?
 
Join Date: Aug 2010
Gender: Male
Nature: Calm
Posts: 330
So. If I have read everything here correctly, applying this to my hack in progress will not cause any problems unless I have been using earlier offsets in the rom, like where all of nintendo's scripts are? But it will clear all of the events already in game including the Pokemon centers/marts? Have I got this correct?
Reply With Quote
  #332    
Old February 4th, 2011 (07:07 AM).
masterquestmq's Avatar
masterquestmq masterquestmq is offline
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Posts: 125
Quote originally posted by metapod23:
So just to make sure, a dialogue script you wrote would look something like this:

Code:
#dynamic 0x800000

#org @start
msgbox @message msg_face
end

#org @message
= Hi!
If you're doing everything about like that, I don't see why any scripts would be deleted. The only problems I've had with scripts being overwritten is when I would put in the offsets manually, instead of letting XSE's dynamic process locate them for me. I've been using the Fire Red Hacked Engine for my hack for some time without having encountered such a problem.



So to be clear

I do not have to use FSF anymore?

just type dynamic #0x800000 and XSE will find the right offset for it?
Reply With Quote
  #333    
Old February 4th, 2011 (09:02 AM).
Johto_legend's Avatar
Johto_legend Johto_legend is offline
 
Join Date: Jan 2010
Gender: Male
Posts: 188
Quote originally posted by masterquestmq:
So to be clear

I do not have to use FSF anymore?

just type dynamic #0x800000 and XSE will find the right offset for it?
no, you will still need FSF. its just that you need to find offsets after 0x800000 in FSF. that way
Reply With Quote
  #334    
Old February 4th, 2011 (01:22 PM).
linkandzelda's Avatar
linkandzelda linkandzelda is offline
n00b desu ka?
 
Join Date: Dec 2006
Location: Hastings, England
Gender: Male
Nature: Careful
Posts: 773
Quote originally posted by Johto_legend:
no, you will still need FSF. its just that you need to find offsets after 0x800000 in FSF. that way
I thought that when using #dynamic 0x800000 XSE will find the space for me and put the script there. I've never used FSF in my life for scripting.
__________________
Reply With Quote
  #335    
Old February 4th, 2011 (02:17 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by Johto_legend:
no, you will still need FSF. its just that you need to find offsets after 0x800000 in FSF. that way
When scripting you just need to put '#dynamic [Offset]' and XSE will find the closest offset from that point onwards to place the script so it isn't necessary to continuously find space in FSF. While FSF is useful if you want/ need to place things beyond the general 0x800000 area its use in scripting is limited thanks to dynamic offsets.
__________________
Reply With Quote
  #336    
Old February 5th, 2011 (06:04 AM).
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
Quote originally posted by masterquestmq:
So to be clear

I do not have to use FSF anymore?

just type dynamic #0x800000 and XSE will find the right offset for it?
Yeah, if you're using XSE, you don't really need FSF for scripting. It's useful for other things, like finding where to insert certain images, or repointing data, though. But XSE does the work of FSF for us when you use the dynamic command. Just make sure "Show Log" is checked in the Batch Compiler, and then copy the offset shown in the log window that pops up after you compile your script, and put that offset in the script in A-Map.
__________________
Reply With Quote
  #337    
Old February 13th, 2011 (03:00 AM).
masterquestmq's Avatar
masterquestmq masterquestmq is offline
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Posts: 125
HI, Me again. this time my question is about flags.

Is it safe to say that most flags have been deleted from the game?
is it safe that i start a flag from 0x200 and go up by one everytime?
Reply With Quote
  #338    
Old February 13th, 2011 (06:07 AM).
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
Quote originally posted by masterquestmq:
HI, Me again. this time my question is about flags.

Is it safe to say that most flags have been deleted from the game?
is it safe that i start a flag from 0x200 and go up by one everytime?
The flags aren't deleted per se. A flag is only safe to use if you know what it's specific purpose was originally and what it does when you set it. One flag turns on the Pokemon menu, another activates the running shoes, etc. You can't use those kinds of flags at all. There are also eight flags that activate each of the Badges. Other flags, like 2C, keep the sprite hidden when set to its Person ID. If you clear that flag, the sprite will no longer be hidden. The flags aren't gone from the game, they still provide the same functions as before, and you're best off just starting where XSE recommends, because you won't know what sort of in-game functions you might be activating or deactivating by using other flags.
__________________
Reply With Quote
  #339    
Old February 13th, 2011 (07:30 AM). Edited February 13th, 2011 by miksy91.
miksy91's Avatar
miksy91 miksy91 is offline
Dark Energy is back in action! ;)
 
Join Date: Oct 2008
Location: A small country in the North
Gender: Male
Nature: Relaxed
Posts: 1,326
Just as metapod said, you shouldn't use certain flags in your hack.
If you know where the game writes the data of flags, you can see which flags are automatically set and which not. However, learning to do it may not be easy as one byte contains the data of eight bits.

Bit no. 1 in the byte = 00/01
Bit no. 2 in the byte = 00/02
Bit no. 3 in the byte = 00/04
Bit no. 4 in the byte = 00/08
Bit no. 5 in the byte = 00/10
Bit no. 6 in the byte = 00/20
Bit no. 7 in the byte = 00/40
Bit no. 8 in the byte = 00/80

So if for example bits number 4 and 7 would be set in certain byte and others wouldn't be set, the byte would be:
00 + 00 + 00 + 08 + 00 + 00 + 40 + 00 = 48


It's safe to use most of the other flags than the ones that are already set when you open the game and play till the point when you appear in your room.
To know which flags are set and which not, use VBA's Memory Viewer and go to the location of the flag bits in RAM.
There is documentation about RAM of 1st & 2nd gen pokemon games so you should be able to find it also for the ones of 3rd.
__________________
My Rom Hack




Learn how to hack GB/C games:

Check my GameBoy/Color hacking videos in Youtube
-The video set uses Pokemon Silver (U) rom for demonstrations
Reply With Quote
  #340    
Old February 14th, 2011 (11:40 AM). Edited February 14th, 2011 by Jambo51.
Jambo51's Avatar
Jambo51 Jambo51 is offline
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Posts: 730
Quote originally posted by miksy91:
Just as metapod said, you shouldn't use certain flags in your hack.
If you know where the game writes the data of flags, you can see which flags are automatically set and which not. However, learning to do it may not be easy as one byte contains the data of eight bits.

Bit no. 1 in the byte = 00/01
Bit no. 2 in the byte = 00/02
Bit no. 3 in the byte = 00/04
Bit no. 4 in the byte = 00/08
Bit no. 5 in the byte = 00/10
Bit no. 6 in the byte = 00/20
Bit no. 7 in the byte = 00/40
Bit no. 8 in the byte = 00/80

So if for example bits number 4 and 7 would be set in certain byte and others wouldn't be set, the byte would be:
00 + 00 + 00 + 08 + 00 + 00 + 40 + 00 = 48


It's safe to use most of the other flags than the ones that are already set when you open the game and play till the point when you appear in your room.
To know which flags are set and which not, use VBA's Memory Viewer and go to the location of the flag bits in RAM.
There is documentation about RAM of 1st & 2nd gen pokemon games so you should be able to find it also for the ones of 3rd.
Most of this is right, except the flags are DMA protected on most of the 3rd Generation Roms. Ruby and Sapphire have static ram locations, FRLG and Emerald's constantly change. So you won't be able to find the flags that easily. On Fire Red, there's a routine called by warping and changing to the battle screen, which, based on the result of the RNG, writes a ram location to 0x03005008. This ram location is static, and is how the game actually makes use of DMA protected information.

It loads the ram offset stored at 0x03005008, and then works out where the data is located with respect to that base offset. The flags are located at
[03005008] + 0xEE0. You can check this easily as long as you don't change map, as the routine is being called when warping and changing into the battle screen.

Also, just as importantly, the variables and flags and other processes in the rom SHARE MEMORY SPACE. In other words, Flags higher than 0x8FF will start using space assigned to the variables 0x4000 and onwards. 0x4000 is the lowest available variable, while 0x8FF is the highest available flag. Trainerflags are in fact just normal flags, meaning it is very unsafe to extend the trainerbattle table as things stand. Trainerflag 0x1 = Normal Flag 0x501 and so on.

Basically, where possible, try to recycle flags and variables already used in the standard rom.
__________________
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
  #341    
Old February 25th, 2011 (12:20 PM).
Crimson5M's Avatar
Crimson5M Crimson5M is offline
what
Crystal Tier
 
Join Date: Feb 2011
Location: Scotland
Age: 19
Gender: Male
Nature: Quiet
Posts: 1,060
With Special 0x66, is it possible to change the HP of the opponents first Pokemon?
__________________
Youtube
Reply With Quote
  #342    
Old March 1st, 2011 (09:16 AM). Edited March 1st, 2011 by louitzie.
louitzie louitzie is offline
 
Join Date: Aug 2009
Gender: Male
Posts: 5
i have a question when i load 2 ore more OWs in one map the lowest event number is shown good but the others are using the pallete of twe lowest event number of the map.
Reply With Quote
  #343    
Old March 24th, 2011 (06:11 AM).
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
I'm having trouble with special 0x64 - the party status modifier.

When I set 0x8005, it ends up making my Pokemon be affected with Sleep no matter which variable I set it to (0-7 are supposed to cause different statuses). If I set it to something other than 0-7, it Poisons the Pokemon to be affected. And if I set it to 40 or 50 it become Paralysis.

It happens that I want to affect it with poison, but I was wondering why I can't get the other statuses to work with the correct status flags?
__________________
Reply With Quote
  #344    
Old April 15th, 2011 (10:41 AM).
Joshuablevins Joshuablevins is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 69
for the set healing place do we still need to use the orignal second map script for pokemon centers?
Reply With Quote
  #345    
Old April 18th, 2011 (06:35 PM). Edited April 18th, 2011 by metapod23.
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
Just another glitch I'm experiencing - for the backsprite switch (setvar 0x4062), any time it loads the new backsprite image and palette, it also changes the palettes of all the trainer sprites in the game. So the palette of the trainer you are versing is the same palette as the backsprite you've switched to. It affectively makes the backsprite switcher unusable for trainer battles.

EDIT: Also to note, the trainer sprites palette returns to its normal palette at the end of battle, when it reappears but the player's backsprite is not there, so I guess it only affects the trainers' palettes when the player's backsprite is present.
__________________
Reply With Quote
  #346    
Old May 10th, 2011 (03:31 AM).
Meta Paradox Meta Paradox is offline
Researching FireRed...
 
Join Date: Apr 2011
Gender: Male
Nature: Serious
Posts: 56
Um, what is the difference between the "FireRed Hacked" and the "FireRed Hacked ENGINE"? Sorry for that awfully dumb question. But I want to know.
__________________
Meta Paradox On The Web:
http://metaparadox.webs.com/
Reply With Quote
  #347    
Old May 12th, 2011 (04:51 AM).
biking101 biking101 is offline
 
Join Date: May 2011
Posts: 1
mac compatible version? wine/winbottler wouldnt work.
Reply With Quote
  #348    
Old June 12th, 2011 (12:09 PM).
ShinyDragonHunter ShinyDragonHunter is offline
 
Join Date: Nov 2010
Gender: Male
Nature: Calm
Posts: 27
I know a feature that you could add into your hacked engine; why not do it so that more direct instruments can be played at one time?
Reply With Quote
  #349    
Old June 12th, 2011 (01:13 PM).
Full Metal's Avatar
Full Metal Full Metal is offline
C(++) Developer.
Silver Tier
 
Join Date: Jan 2008
Location: In my mind.
Age: 19
Gender: Male
Nature: Timid
Posts: 805
Send a message via Windows Live Messenger to Full Metal
Quote originally posted by Meta Paradox:
Um, what is the difference between the "FireRed Hacked" and the "FireRed Hacked ENGINE"? Sorry for that awfully dumb question. But I want to know.
A game engine refers to the gears that work behind the scenes: what you ( the player ) doesn't see. Eg: Player moving, music playing etc.

@ShinyDragonHunter - I'm fairly certain this is a limitation of the GBA -- not -- the games original engine. I may be wrong though.

@biking101 - The tool was written in a .NET language. Use mono instead of wine.
__________________

★ full metal.

I like to push it,
and push it,
until my luck is over.
Reply With Quote
  #350    
Old June 14th, 2011 (04:57 AM).
RHIOneAlbum RHIOneAlbum is offline
Banned
 
Join Date: Jun 2011
Location: Dark Maroon City
Nature: Serious
Posts: 214
Send a message via AIM to RHIOneAlbum
Nice, its really good and impressive. Of course I can point out a few minor things, but they've all been mentioned before, great work on this!
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
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

Forum Jump


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