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

My thoughts on the random movesets... - Page 1

My thoughts on the random movesets...

Posted by: Tweaker
Date: 2006-03-25 00:20:01
Having experience with mappings, and how they're generally accessed via a lookup table, something tells me that these random moves are due to incorrect mappings definition values.

Think of it this way: Each Pokemon has its own value which defines a 16-bit pointer from an index somewhere in the ROM. When you come up with a Pokemon such as Missingno., this means what it sounds like – a missing number in this table. Perhaps ones that were planned to be implemented, but never were. What we get would be the leftover/incomplete stats from these scrapped Pokemon, right?

But then we move on to odder values, such as 4_4 and the like. These make less and less sense as you up the current Pokemon ID values, and some even crash! This is makes me think that this value is reading beyond the actual sprite index for the Pokemon stat definitions, and is reading random data in place of actual pointers. Because of this, and how some produce odd results, it makes me think there's a predetermined layout of values to define stats for Pokemon in the game, and bad pointers lead to random values (which would explain learning moves after level 100). So the way I see it, this layout of values defines these main things:

-ID for mappings frame to use for names. Note how some are completely random, and some are Missingno. – I bet you the Missingno. ones were supposed to be real Pokemon at one point, and got scrapped during development. So they replaced the stat definitions they had and the mappings definition with the ID for the "Missingno." frame, to define that the value is indeed unused.

-Moves to learn (via an pointer index, defined by ID), and at what level to (hex value). This would make it so once the index has ended and the game is reading random pointers, that this value table could still produce some sort of stats, nonsensical as they are. For example, if a move definition were to be something like "AB FE," that would tell the Pokemon to learn move ID AB (which very well could be something like "HM05" or "COOLTRAINER," depending on the text entry on the index) at level 254 (FE in hex = 254 in decimal). Note that I'm pretty sure this isn't how the game does things, but it seems like a plausible method based on the fact that these nonsense Pokemon ID values can be accessed with partially working Pokemon.

-Pointer to mappings for Pokemon art. Now THIS is the interesting part – The whole glitched names/graphics for invalid Pokemon are undoubtedly due to incorrect mappings, reading from a redundant section in VRAM. The second part of this would be the art to uncompress when a Pokemon appears – if this is defined somehow along with which mappings to use, then the fact that the graphics are total garbage could also be due to the fact that the data being decompressed is NOT art, but random data instead. From my experience in reading generic data as art data, it appears almost exactly like the art for 'M' et all. By actually finding these definitions, we can probably fix these glitches to load entirely new Pokemon of our own creation. Taking a look at some Pokemon hacks around, doing this actually won't be much of a problem. This stat table would be the only thing in the way.

To get to the main point regarding random moves (and I may have actually stated it already) - Moves, and the mappings ID for them are stored in a close, but seperate area. Both these tables co-interact with each other – they define the move programming and mappings to use for them. These "glitch moves" most likely point to now-non-existant programming, which define a mappings ID for a text entry that DOES exist (hence cooltrainer, or etc).

…god, did I really type that much? Anyway, if anyone here knows how the game engine works and would like to enlighten/correct me, I'd greatly appreciate it. This is what I've come up with among many observations, and I most likely could be wrong, but this is the conclusion I've come to.

Re: My thoughts on the random movesets...

Posted by: Abwayax
Date: 2006-03-25 00:41:19
… I think I follow where you're going with this. I was told by someone with much experience with the Pok?mon ROM that the glitch moves are actually in the pokemon database. How had he put it?

<@Okk> The glitch move data that I sent you
<@Abwayax> yes?
<@Okk> It's the beginning of the pokemon database.
<@Abwayax> You mean the TM moves?
<@Okk> I mean it's a chunk of the pokemon database… I forgot that I only sent the TM and HM moves..
<@Abwayax> hmm
<@Okk> but if you were to change the first few glitch moves, you would be changing Bulbasaur.
<@Okk> The pokemon database starts immediately after the last valid move.


So this is where some of the "incorrect mappings" come in - the game is actually accessing Pok?mon data when it goes to look for the attack "HM01" or whatever. The names for items and attacks (and probably pokemon too) themselves must be stored very close to each other. This is what usually happens when you go outside of the boundary of the database for anything - pokemon, attacks, items, sprites, text, even maps. LM4's learned moves could, for example, be sprite art or map data. I don't know much about the game's internal coding, though.

And judging from the odd order of the main pokemon table (01 to BE, I believe), with MissingNo's scattered all around, it could be quite plausible those are scrapped pokemon that were implemented earlier, but taken out (which is why I want a pokemon R/B beta ROM >>;).

By actually finding these definitions, we can probably fix these glitches to load entirely new Pokemon of our own creation. Taking a look at some Pokemon hacks around, doing this actually won't be much of a problem. This stat table would be the only thing in the way.

Yeah, this would be possible, given that we be wary of anything else we end up fiddling with.

On an unrelated note, Tweaker, welcome to the Glitch City Laboratories forums. :)

Re: My thoughts on the random movesets...

Posted by: Quickman
Date: 2006-03-25 14:45:39
When you come up with a Pokemon such as Missingno., this means what it sounds like – a missing number in this table. Perhaps ones that were planned to be implemented, but never were. What we get would be the leftover/incomplete stats from these scrapped Pokemon, right?


Nada. There's no extraneous data like that in the ROM. Missingno. changes drastically depending on exactly how you encounter him - try encountering him via a Gameshark in another route.

So this is where some of the "incorrect mappings" come in - the game is actually accessing Pok?mon data when it goes to look for the attack "HM01" or whatever.


That's not a satisfactory explanation in my opinion - TeamRocketRose has gone through and tried out all the glitch attacks from Struggle onwards and found a variety of effects; that doesn't tally. (Admittedly, when I conducted another experiment to test the same thing the results were different; one attack was the misbehaviour routine for when your Pokemon is too high a level.)

I bet you the Missingno. ones were supposed to be real Pokemon at one point, and got scrapped during development. So they replaced the stat definitions they had and the mappings definition with the ID for the "Missingno." frame, to define that the value is indeed unused.


Missingno. doesn't HAVE any mappings or stat data - he grabs them from an arbitrary RAM location, depending on where you encounter him. It's an error message indicating a non-valid Pokemon code has been entered, used for betatesting purposes (if they encountered it then they knew there was a stale pointer somewhere from their shuffling around of Pokemon).

Re: My thoughts on the random movesets...

Posted by: Abwayax
Date: 2006-03-25 15:31:46

So this is where some of the "incorrect mappings" come in - the game is actually accessing Pok?mon data when it goes to look for the attack "HM01" or whatever.

That's not a satisfactory explanation in my opinion - TeamRocketRose has gone through and tried out all the glitch attacks from Struggle onwards and found a variety of effects; that doesn't tally. (Admittedly, when I conducted another experiment to test the same thing the results were different; one attack was the misbehaviour routine for when your Pokemon is too high a level.)

I'd like to point out that:
1. Struggle isn't a glitch attack.
2. That data was orignally collected by - guess who! - me! Team Rocket Rose does little of the actual in-game research herself, most of it is done by visitors to her site. (For your reference, here is the document it came in: http://glitchcity.ath.cx/research.doc. "Nemesis" is a handle I went by in 2003 (when the doc was compiled), and is not to be confused with the Sonic rom hacker "Nemesis". Notice the creepy similarities between that and the info on TRR's hex table.) Not that that really matters, but I feel a bit annoyed when I don't get credit for the info I investigated.

A more in-depth investigation of the attacks from HM01 to TM55 is going on here. The attacks in between the TM attacks and the valid ones seem to have game-wrecking effects (or effects that sometimes wreck the game).

Of course, I haven't actually seen where the two tables overlap; I trust Okk completely because he is one of the experts on the ROM data that I know.

And on another unrelated note - welcome, Quickman, to the forums. :)

Re: My thoughts on the random movesets...

Posted by: Glitch Reaper
Date: 2006-04-10 14:45:26
I remember suggesting this before. The programming matrix for Glitch Pokemon is basically grasping at straws. With no built in lv. 100 learning curve or evolution limit strange things will happen. If a database program is use it may be useful to think of it as pulling in adjacent data blocks to continue its own table if not told otherwise.