• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Quick Research & Development Thread

1,234
Posts
13
Years
  • Seen Mar 10, 2013
Even if you tried expanding the viewable area on an emulator I'm almost certain that the system would not draw anything outside of the original screen size, due to the nature of how 2D consoles, and emulation of them, work

You can do this with emulators for 3D consoles like N64, DC and Gamecube, but they're a completely different beast when it comes to emulation and passing the graphics to your computer to be drawn - and it totally depends on the game whether or not you'll get a useful result from displaying more screen area than was originally intended.

As for your other point, for all intents and purposes the DS is treated as a Game Boy Advance when it goes into backwards compatibility mode - the main processor of the GBA is identical to the second processor of the DS, so the game's code can be run natively on the system. It behaves exactly the same as a GBA would.
 
Last edited:
73
Posts
14
Years
  • Seen Aug 31, 2014
How hard would it be to make a tool for editing Pokemon Abilities--names, effects, descriptions--or adding new ones in Gen III?
 
73
Posts
14
Years
  • Seen Aug 31, 2014
Do you mean like YAPE? That's a good one.

YAPE lets me give pokemon any ability in the game, yes, but I'd like to edit the Abilities themselves. For example, I wouldn't mind making Lightning Rod act like it does Gen V or put in Motor Drive.
 

TheDarkShark

Metal Headed Hacker
56
Posts
13
Years
If there was a tool for something like that, I'd probably leave GBA-Hacking - it'd be too easy (which it already is, IMO). If you want something alike, you'll have to do some serious hacking involving ASM.
If you don't want to do it that way, you don't want that feature bad enough to deserve it. That's my philosophy.

Anyway, try putting a break on read at a pokemon's Ability. That should lead you to most routines which use them. Then you can easily extend the header to enable new abilities. That won't do the job, though. AFAIK, each ability has it's own ASM-routines, so you'd need to wright new code.
I'm sure there's a thread around dealing with it. I think it's name was "modernizing the Firered-field engine" or something.
I hope I could help you - at least a bit.
 

Jambo51

Glory To Arstotzka
736
Posts
14
Years
  • Seen Jan 28, 2018
YAPE lets me give pokemon any ability in the game, yes, but I'd like to edit the Abilities themselves. For example, I wouldn't mind making Lightning Rod act like it does Gen V or put in Motor Drive.

I don't wanna s**t all over your hopes, but there is no such editor. And I highly doubt there ever will be.

Gamer2020's tool lets you change/add ability names and descriptions, but there is no way to create custom ability effects without using ASM.

I'm currently working on adding pretty much everything I can from gen 4/5 into gen 3, abilities included. Give me some time, and I'll see what I can do.
 
275
Posts
13
Years
  • Seen Oct 9, 2019
Hey, guys, just a heads-up. I haven't confirmed anything yet, but...

The RAM used by JPAN's Hacked Engine (1856 bytes starting at 0x0203F3C0) appears to overlap a small RAM space used by the Teachy TV's ASM (10 bytes starting at 0x0203F444). This sound minor, but it's a clear indicator that the RAM isn't unused, and it also means that there may be more overlaps with other seldom-used functionality.

I haven't heard of any particularly-bizarre or unexplained problems arising from JPAN's Hacked Engine, and it's worked excellently for me; this is just a minor thing to keep in mind. Nothing major should be affected by RAM conflicts with JPAN's code.
 
141
Posts
13
Years
  • Seen Feb 10, 2012
World Map

I'm not sure if this has yet to have been accomplished but I've read Darthatron says its possible. I'm trying to find and way to increase the number of unique world map tiles to at least 2048 but I had read Darthatron said the max that was possible was 4096. Any information would be greatly appreciated!
 

SupahNinja

Scripting Ninja
34
Posts
13
Years
  • Seen Dec 23, 2011
Code:
LIST OF IDENTIFIED IN-GAME VARS (FIRERED)

4000        Temporary/disposable variable.
            Written to by special E7.
4001        Temporary/disposable variable.
4003        Temporary/disposable variable? Used in TRAINER TOWER.
4006        Temporary/disposable variable? Used in TANOBY KEY.
4008        Temporary/disposable variable? Used in TANOBY KEY.
400E        Temporary/disposable variable? Used in TRAINER TOWER.
400F        Temporary/disposable variable? Used in TRAINER TOWER.
4010        Temporary/disposable variable.
            Written to by (incomplete?) special 142.
4020        Pedometer. It counts down, and upon reaching 0x0000, REPEL expires.
4021        Pedometer. Max value 0x007F; it loops back to 0x0000 after.
4022        Pedometer. Max value 0x0004; it loops back to 0x0000 after.
4023        Pedometer. Max value 0x05DC; it just stays at that value after?
4025        Pedometer? Used for DAISY's script? Haven't seen it in action myself yet.
            Set to 0x01F4 (500) by GAME START SCRIPT.
4031        The starter that the player chose (0, 1, 2).
            Accessed directly by special 129.
4036        Multi-use, for SELPHY's Pokemon-fetching-and-showing game.
            Apparently set to 0x0000 when it's time for a new "round" to start.
            Apparently set to 0xFFFF if you're out of time.
4037        Box that a newly-received (givepokemon) Pokemon was sent to. Is directly manipulated by the game engine 
        itself.
            Read by special 165.
4038        Unknown.
            Read by specials A6 and A9.
            Written to by special A8.
            Used by special AA.
4039        Unknown.
            Written to by specials A6, A7, and A9.
403A        Used in elevator scripts (current floor?). Written to by special 0xD8.
403C        0xXXYY -- the current bank and map, respectively.
403E        Unknown.
            Accessed directly by special 1AC.
4042        Unknown.
            Read by special 167.
4043        Unknown.
            Written to by special 167.
4049        Unknown. Something to do with the sticker kid on FOUR ISLAND.
404A        Unknown. Something to do with the sticker kid on FOUR ISLAND.
404B        Unknown. Something to do with the sticker kid on FOUR ISLAND.
404E        Unknown.
            Written to by special 197.
4050        Unknown or multi-use.
            Set to 0x1 after the "Don't go out yet!" OAK Script event.
            Set to 0x2 during the Hall of Fame room level script, if the National Dex is NOT already unlocked.
            Set to 0x3 after OAK's chat with the player in PALLET TOWN after beating the E4.
4051        Set to 0x2 to disable the "Old Man Needs Coffee" Script event in VIRIDIAN CITY.
4052        Set to 0x1 to disable Script events for Gary in CERULEAN CITY.
4053        Unknown. Set to 0x0 after the player watches the S.S. ANNE depart.
4054        Unknown or multi-use.
            Set to 0x2 to disable Script events for a Rival encounter on ROUTE 22.
            Set to 0x3 after VIRIDIAN CITY Gym Leader GIOVANNI is defeated. Enables next Rival.
            Set to 0x4 to disable Script events for a second Rival encounter on ROUTE 22.
4055        Unknown.
            Is set to 0x0 when the player hasn't encounted PROF. OAK yet.
            Is set to 0x1 when OAK is escorting the player to his lab.
            Is set to 0x2 when the player needs to choose a starter.
            Is set to 0x3 when the player and their Rival have both chosen starters.
            Is set to 0x4 after the player's first battle with their Rival.
            Is set to 0x5 when the player needs to deliver OAK's PARCEL.
            Is set to 0x9 when the player enters PROF. OAK while it is set to 0x8.
            If >= 0x1 and no other events pending, then DAISY comments on a recent Rival battle.
            Set to 0x7 after OAK's chat with the player in PALLET TOWN after beating the E4.
4056        Unknown. If equal to 0x0, "sethealingplace" runs whenever the player enters their bedroom in 
        PALLET TOWN. Another level script then sets the variable to 0x1.
4057        Multi-use.
            Set to 0x1 to disable the OAK's PARCEL level script in VIRIDIAN CITY's PokeMart.
            Set to some other value to enable VIRIDIAN CITY's normal PokeMart script.
4058        Unknown. Checked by DAISY's script in PALLET TOWN. Apparently part of the sequence of events 
        that makes her give away the TOWN MAP.
            Set to 0x2 when DAISY gives away the TOWN MAP.
4059        If != 0x0, then the player beat the Ghost MAROWAK at POKeMON TOWER.
405A        Set to some value to disable the Old Man that blocks the VIRIDIAN CITY Gym.
405B        Multi-use.
            Set to 0x1 to disable Script events for a Rival encounter on the S.S. ANNE.
            Is set to 0x1 when entering LAVENDER TOWN.
405C        If != 0x0, then the player beat Gary at SILPH CO.
405D        If != 0x0, then the player beat Gary at POKeMON TOWER.
405E        Set to 0x0 to disable Script events on the tiles bordering the exits to the CYCLING ROAD 
        gatehouse. Set to 0x1 to disable Script events on the tiles bordering the entrances.
405F        Controls various badge-checking Script events on Route 23.
4060        If >= 0x1, then TEAM ROCKET has left SILPH CO.
4061        Set to 0x1 to disable the Pay-To-Enter Script events in PEWTER CITY's Museum.
4062        Set to 0x1 to disable the thirsty-guard roadblock Script events in the SAFFRON gatehouses.
4064        Unknown or multi-use.
            Reset to 0x0000 when entering Route 23.
            Used as part of the Boulder puzzle scripts in VICTORY ROAD.
4065        Unknown or multi-use.
            Reset to 0x0000 when entering Route 23.
            Used as part of the Boulder puzzle scripts in VICTORY ROAD.
4066        Unknown or multi-use.
            Reset to 0x0000 when entering Route 23.
            Used as part of the Boulder puzzle scripts in VICTORY ROAD.
4067        Unknown. Reset to 0x0000 when entering Route 23.
4068        Set to 0x2 after an Elite Four chamber level script forces the player to walk up. Rechecked 
        later after the E4 battle in that chamber has ended. Reset to 0x0000 in the Hall of Fame room.
4069        Set to 0x1, 0x2, or 0x3 depending on which fossil is being revived at the CINNABAR ISLAND 
        lab.
406A        Fossil revival process. 0x1 means that a revival is in progress. 0x2 means that it is 
        complete.
406B        Set to 0x1 to disable Script events for the Nugget Bridge challenge.
406C        Unknown or multi-use.
            Set to 0x1 to disable the man that traps you in PEWTER until you beat Brock.
            Set to 0x2 to disable Script events for the man that gives Running Shoes at PEWTER.
406E        Safari Zone status.
            Set to 0x0 when not in the SAFARI ZONE.
            Set to 0x1 ...?
            Set to 0x2 after paying to enter the SAFARI ZONE.
406F        I haven't the faintest idea. Used in Pokemon Center 2F level scripts.
4070        Set to 0x1 when talking to some chick in PALLET TOWN that mimics a sign or whatever.
4071        See 408A.
4073        Affects dialogue in the SAFFRON CITY TRAINER FAN CLUB building.
            Is set to 0x1 when the occupants -- your new fans -- swarm you.
4074        Unknown. Checked if != 0x0 in a level script for the woman-who-likes-battles's house (map 
        31.0).
4075        Used in a ONE ISLAND level script. If it equals 0x2, BILL will welcome you to ONE ISLAND, 
        bring you into the PokeCenter to see CELIO, and then the variable will be set to 0x3.
4076        Multi-use, for the RUBY/SAPPHIRE subplot.
            Set to 0x4 if hasn't beaten the ROCKET GRUNTs they eavesdrop on at MT. EMBER?
            Set to 0x5 when the RUBY has been delivered to CELIO on ONE ISLAND.
            Set to 0x6 when the subplot is complete.
            If >= 0x5, VERMILION dockworker acknowledges your RAINBOW PASS. (Travel to SEVII)
            If >= 0x1, VERMILION dockworker acknowledges your TRI-PASS. (Travel to SEVII 1-3)
4078        Affects the commentary and items offered by the shopkeeper on One Island. The variable's 
        value is managed by a TWO ISLAND level script that checks various flags.
            0x4078 == 0x2 means that Lostelle has been rescued.
            0x4078 == 0x3 means that you've beaten all Gyms, but not the Elite Four. (?)
            0x4078 == 0x4 means that the shopkeeper offers items "from distant lands". (Beat E4)
4079        Multi-use, for the LOSTELLE event.
            Set to 0x1 after dealing with a Biker at the TWO ISLAND GAME CORNER.
            Set to 0x2 after rescuing LOSTELLE in BERRY FOREST, before warping to her home.
            Is set to 0x3 when LOSTELLE is reunited with her father.
            Is set to 0x4 when the subplot is complete.
407B        Unknown or multi-use.
            Set to 0x2 to enable the first Script events for the Bikers in THREE ISLAND?
            Set to 0x3 to disable the first Script events for the Bikers in THREE ISLAND.
            Set to 0x4 to disable the second Script events for the Bikers. (They leave.)
407C        Unknown or multi-use.
            Set to 0x1 to ...?
            Set to 0x2 to disable the Pokemon Center 2F level script (TEALA's tutorial).
407D        Set to 0x1 to disable the ROCKET GRUNT Script events behind the broken home in CERULEAN.
407E        Unknown or multi-use.
            Is set to 0x1 after the player helps the S.S. ANNE's captain.
            Is set to 0x2 when the player is stepping out of a boat and into VERMILION CITY or the S.S. ANNE harbor.
            Is set to 0x3 when the S.S. ANNE has departed VERMILION CITY.
407F        Set to 0x2 after a Script event on MT. EMBER, in which the player hears ROCKET GRUNTs talk.
4080        Set to 0x1 after a Script event in ICEFALL CAVE, in which the player assists LORELEI.
4081        Set to 0x1 to disable a Script event blocking access to the Pokemon in the FIGHTING DOJO.
4082        Multi-use.
            Set to 0x0 to enable a Script event at the TRAINER TOWER counter. (A level script 
            on the tower's exterior (Map 3.62) does this.)
            Set to 0x1 to disable a Script event at the TRAINER TOWER counter.
4083        Set to 0x1 upon entering the LOST CAVE room with the lost woman.
4084        Multi-use, for the SELPHY event.
            Set to 0x1 upon rescuing SELPHY from LOST CAVE, before warping to RESORT GORGEOUS.
            Set to 0x2 upon being promptly dismissed from her front door (level script).
4085        Unknown. Used in two level scripts for INDIGO PLATEAU (3.9). Does something if it equals 1.
4086        Set to 0x1 to disable a FOUR ISLAND level script (Gary encounter without battle).
4088        Set to 0x1 to disable Script events in ROCKET WAREHOUSE.
4089        Set to 0x1 to disable a SIX ISLAND (37.0) level script (Gary encounter without battle).
408A        Multi-use, for an event where you meet BILL at CINNABAR ISLAND's PokeCenter, and he leaves on 
        a boat.
            Set to 0x1 upon meeting BILL in the PokeCenter. The same script makes you both leave.
            Is set to 0x1 when used in level scripts that show BILL's departure from the island.
408B        Set to 0x1 to disable the Script events for the fossil guy in MT. MOON.
...
5EF4 - 7FFF    CONFIRMED UNSAFE! In PC box space!
Does this mean that vars under 4000 (and vars in betwen 408B and 5EF4) are safe to use?
 
275
Posts
13
Years
  • Seen Oct 9, 2019
Does this mean that vars under 4000 are safe to use?
Variables under 4000 can't be used because:

  • They overlap RAM used for flags
  • Most script commands don't recognize them as variables
    • Most commands basically do this: "If argument > 0x3FFF, then find the value of variable number argument and use that value. Else, use argument itself as a value."
Does this mean that vars in betwen 408B and 5EF4 are safe to use?
Some of them have been confirmed unsafe since I last updated that document. The rest are a mystery and could be safe or unsafe.

  • Variables 0x4100 to 0x417F (inclusive) overlap the RAM used for a special data type called "hidden variables" -- a set of 64 dwords used by certain script commands whose purpose is unknown.
  • Variables 0x5084 to 0x55CC overlap RAM used for seemingly-arbitrary data. I haven't noticed any ill effects from overwriting this data, but it changes frequently, so the variables themselves are unreliable.
  • Variables 0x56F4 - 0x5EF3 appear to also overlap RAM used for the PC. This doesn't match with JPAN's findings (the 0x5EF4 figure is from him) so either one of us is wrong, or this variable range overlaps non-essential parts of the PC data.
My suspicion -- an unconfirmed one -- is that the only safe variables are those from 0x4000 to 0x40FF (inclusive), excluding variables in that range that are set or read by the core game engine (as opposed to those used by scripts that can be safely removed).

Basically, you're better off keeping your variables to a minimum. If you find yourself running short on variables, see if flags (or perhaps key items) could be used instead of variables to track the player's progression through different scripts.
 

SupahNinja

Scripting Ninja
34
Posts
13
Years
  • Seen Dec 23, 2011
Variables under 4000 can't be used because:

  • They overlap RAM used for flags
  • Most script commands don't recognize them as variables
    • Most commands basically do this: "If argument > 0x3FFF, then find the value of variable number argument and use that value. Else, use argument itself as a value."
Some of them have been confirmed unsafe since I last updated that document. The rest are a mystery and could be safe or unsafe.

  • Variables 0x4100 to 0x417F (inclusive) overlap the RAM used for a special data type called "hidden variables" -- a set of 64 dwords used by certain script commands whose purpose is unknown.
  • Variables 0x5084 to 0x55CC overlap RAM used for seemingly-arbitrary data. I haven't noticed any ill effects from overwriting this data, but it changes frequently, so the variables themselves are unreliable.
  • Variables 0x56F4 - 0x5EF3 appear to also overlap RAM used for the PC. This doesn't match with JPAN's findings (the 0x5EF4 figure is from him) so either one of us is wrong, or this variable range overlaps non-essential parts of the PC data.
My suspicion -- an unconfirmed one -- is that the only safe variables are those from 0x4000 to 0x40FF (inclusive), excluding variables in that range that are set or read by the core game engine (as opposed to those used by scripts that can be safely removed).

Basically, you're better off keeping your variables to a minimum. If you find yourself running short on variables, see if flags (or perhaps key items) could be used instead of variables to track the player's progression through different scripts.

Okay, thank you.
So I'll use flags when possible, and when I need variables (let's say, for the scripts that activate when stepped on by the player, and require a certain variable to be set) then I'll use 0x4000 to 0x40FF.
If any of the variables cause an error, I'll report back here so you can update the list.
 

EdensElite

No0b, but getting there.
190
Posts
12
Years
  • Age 28
  • UK
  • Seen Jul 4, 2014
Hey Guys. I've been trying to find out how to edit the PC Boxes for a while. So far all I've find out is that it is stored in the VRAM and what I've include in the screenshot below. If anyone experienced with Hex etc. can help me out, I would really appreciate it :)

Findings


I managed to find the header. I havn't tried editing it yet. As I'm more interested interested in the actual box. I noticed that most boxes only use one or two different tiles repeated over and over, so maybe there isn't actually a whole image to edit unlike Gen IV games. In which case it's possible that those tiles are in that picture and I missed them.
 

Awkward Squirtle

,@,e .ºoO
110
Posts
12
Years
  • Seen Jan 29, 2016
Uh... they're stored in the ROM, and copied to the VRAM when the game needs to draw them to the screen. I suspect they're uncompressed in the ROM, so you could just use a tile editor to change them (if you can find them).
 

IIMarckus

J946@5488AA97464
402
Posts
16
Years
  • Seen Feb 21, 2024
I've been curious as to this for a while, but has anyone managed to create a Mode 7 hack for these games? I think it can be done- it was done with Super Mario World and it's 2D graphics engine.
Mode 7 can be done on the GBA. It's kind of limited because you can only manipulate two planes this way (essentially, a floor and a ceiling)—walls and such have to be sprites. Since they can't be scaled in the same way, you have to create separate sprites for various distances, and switch between them. It works better for open areas with no walls.
 

M.L

Invisible
761
Posts
13
Years
  • Seen Dec 21, 2017
Small question i have seen a animated titlescreen before but im curious is it possible to create an animated Battle background like leaves in blowing or rock in the cave falling or sea moving or somthing like that?
 

TheDarkShark

Metal Headed Hacker
56
Posts
13
Years
Well, it could be doable, but you'd need to find out how the background image is drawn and update it every second or so, which might be kind of hard considering that you'd need to hack the battle engine itself, eventually, which of course takes a lot of ASM skillz.
 

IIMarckus

J946@5488AA97464
402
Posts
16
Years
  • Seen Feb 21, 2024
Interesting. Perhaps a minigame of sorts could benefit from this. But to have many several sprites for different distances, couldn't a calculation be used, and depending on how far away from an object yor are, it would scale/resize the image? It'd take up less space.
I'm not the one to ask about efficiency here. The GBA is not really my forte, and I've never worked with Mode 7, so I really can't provide any details. Try reading up on it.
But if I were to write that- I'd have to learn ASM first.
Do it! ASM isn't nearly as hard as people make it out to be, and it's a lot of fun.
 
Back
Top