• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

[ASM & Hex] How do special 0xD8 and 0x1B8 work?

Hi all,

I'm making an elevator script. Which is the following:
Spoiler:


Which works, but it isn't polished.

When special 0xD8 is called and updates variable 0x403A, the 'now on floor X' displays the wrong floor after reentering the map of the elevator. See Gif below.
[PokeCommunity.com] How do special 0xD8 and 0x1B8 work?

Somehow the game updates variable 0x403A and keeps track of what floor you are on, but I don't know how it works and therefore how to change it. Because it still shows the floors of the original ROCKET HIDEOUT after reentering.

Does anybody knows how this works, since I can't seem to find it anywhere:)
 
0d8 updates the value of 0x403a, vased on the value at (0300500c)+0x12
1b8 sets the value of 0x02039a0e depending on the value of itself and 0x02039a10
Source.
 
Last edited:
I haven't done this in a while, but I looked up an old elevator script of mine, and for every floor option I set 0x403A to a different number depending on the floor. For F1 set var 0x403A equal to 0x4 and any lower than that is a basement floor. I didn't use special 0xD8. That way you can always update the floor to what you want it to be.
 
Back
Top