Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Generation I Glitch Discussion

Teleport's animation looping after encountering yellow MissingNo? - Page 1

Teleport's animation looping after encountering yellow MissingNo?

Posted by: Narashae
Date: 2016-05-22 15:44:15
I was trying some things out with the yellow missingno, because there's not a lot known about this version. After running away from the encounter, I got the multiple walking characters to trigger, as per usual. However, I then walked a bit, before realizing that I had to use teleport to fix the multiple walking characters effect. Strangely enough, the teleport kept wrapping around the screen, never coming to an end, meaning I was forced to restart the game.

I've got a bad recording of this: https://a.pomf.cat/htluuj.mp4 . You can see that the background sprites have stopped walking, which normally also happens when you teleport away. The game didn't actually teleport me to the pokecenter, though. Anyone got a clue why this has happened?

Re: Teleport's animation looping after encountering yellow MissingNo?

Posted by: Torchickens
Date: 2016-05-23 10:18:35

I was trying some things out with the yellow missingno, because there's not a lot known about this version. After running away from the encounter, I got the multiple walking characters to trigger, as per usual. However, I then walked a bit, before realizing that I had to use teleport to fix the multiple walking characters effect. Strangely enough, the teleport kept wrapping around the screen, never coming to an end, meaning I was forced to restart the game.

I've got a bad recording of this: https://a.pomf.cat/htluuj.mp4 . You can see that the background sprites have stopped walking, which normally also happens when you teleport away. The game didn't actually teleport me to the pokecenter, though. Anyone got a clue why this has happened?

This effect may happen if you view the statuses of the Yellow glitch Pokémon "?/" (EC) and " p (F4)" too. This corrupts your overworld sprite, and the effect occurs when you try to Teleport away; hence it's possible the problem is related to your corrupted sprite.

Re: Teleport's animation looping after encountering yellow MissingNo?

Posted by: Narashae
Date: 2016-05-23 12:04:04

This effect may happen if you view the statuses of the Yellow glitch Pokémon "?/" (EC) and " p (F4)" too. This corrupts your overworld sprite, and the effect occurs when you try to Teleport away; hence it's possible the problem is related to your corrupted sprite.


Hmm, would that mean that the duration of the teleport animation is somehow affected by the player's sprite? I'm not currently able to get on an emulator, but wouldn't that mean that the teleport itself is delayed until the end of the animation?

Re: Teleport's animation looping after encountering yellow MissingNo?

Posted by: TheZZAZZGlitch
Date: 2016-05-23 13:20:35
The game executes the teleport animation by moving the player up by 0x10 pixels, checking if player's sprite Y position is exactly 0xEC, and repeating the process if it isn't.

Normally the player's sprite is at position 0x3C. So the animation goes on for 6 cycles:
[tt]3C -> 2C -> 1C -> 0C -> FC -> EC[/tt]

But if the player's sprite is put in a different Y position (let's say 0x69), the value of 0xEC is never reached, and thus, the animation goes on forever in an infinite loop.

[tt]69 -> 59 -> 49 -> 39 -> 29 -> 19 -> 09 -> F9 -> E9 -> D9 -> C9 -> B9 -> A9 -> 99 -> 89 -> 79 -> 69 -> …[/tt]

Obligatory piece of code from disassembly:

[tt]PlayerSpinWhileMovingUpOrDown: ; 70755 (1c:4755)
    call SpinPlayerSprite
    ; in our case, a is set here to -0x10 (essentially 0xF0)
    ld a, [wPlayerSpinWhileMovingUpOrDownAnimDeltaY]
    ld c, a
    ld a, [wSpriteStateData1 + 4] ; player's sprite Y screen position
    add c
    ld [wSpriteStateData1 + 4], a
    ld c, a
    ; in our case, a is set here to 0xEC
    ld a, [wPlayerSpinWhileMovingUpOrDownAnimMaxY]
    ; check if we hit the maximum Y position EXACTLY

    cp c
    ; exit if we did
    ret z
    ld a, [wPlayerSpinWhileMovingUpOrDownAnimFrameDelay]
    ld c, a
    call DelayFrames
    ; otherwise repeat until we get there
    jr PlayerSpinWhileMovingUpOrDown[/tt]

Re: Teleport's animation looping after encountering yellow MissingNo?

Posted by: Torchickens
Date: 2016-05-23 15:04:52
Interesting! Cool find TheZZAZZGlitch.