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 IV Glitch Discussion

Using ledges to break collision, graphics and more - Page 1

Using ledges to break collision, graphics and more

Posted by: RETIRE
Date: 2019-01-12 11:54:01
As some of you may know, in the void you can write tiles utilising graphic reloads to manipulate ram. One interesting tile that can be written is a ledgetile that moves the player 3 tiles. When you walk onto this ledge, the player is not restricted from opening menus or activating items.

When using an item you can buffer a textbox or even open a town map, but it won't stop the player from jumping. The fust particles might display after reloading the map. I have not yet tried all key items to see their results.

When opening the menu, the game stops you from jumping midair. Not only does this mean you are hovering, you also are in between two tiles. Now comes the fun stuff. This doesn't only move the model you are currently loading, it also puts the game in a state where it will not load any new mapmodels, meaning the current one is permanently loaded. Not only that, by ledgecanceling twice you can remove the barrier around sinnoh, which in combination with the models not loading until a graphic reload, gives you walk through walls. you can literaly walk up to shaymin or darkrai without even having to save at their area! Sadly, as with many glitches in gen 4, the tilewriting for this specific tile is ASLR bound. So, this route is very inconsistent and will only work if you
1) have extreme luck with your Variable pointer/ [Base] (confirmed working: 226d294)
2) manipulate the Base pointer.

If the latter can be done, this is a very useful alternative to getting to darkrai's area, as this is the first route that wouldn't require insane setups, or not require battle towers. This glitch clearly has some gamebreaking potential. Confirmation on hardware is still pending, as getting the right ASLR would be easier once we know how to manipulate it.

I made two videos, one showing the mapmodel, particles and npc's move and one showing the loadlines move:

https://youtu.be/N3OfTE_MVPc

https://youtu.be/Jzh2kDC9eU0

You can also move the graphics / camera so far that you can enter a different map in the void, and see the npc's you load in there.

[img]https://i.imgur.com/QMzxeiG.png[/img]

Here are two pre-written routes for Darkrai and Shaymin I made today:

1 S
17 W
18 S bike (key item)
1 N graphic reload
415 W
Sr
33 E
383 N
14 E
graphic reload
128 N
1 E
graphic reload
479 S
273 E
256 S
21 E
1 S + Spam menu!
1 N
1 E
1 S + Spam menu!
1 N

choose route:
————–
Darkrai:
213 E
14 S
graphic reload
1 N into tree => warp into darkrais area
————–
Shaymin:

938 E
52 N
47 E

Save reset or press A => battle against shaymin
If press A:

6 S
1 E
south until Seabreak Path, fly/teleport (other movement may softlock)

in order to write the tile, you need to graphic in any outdoor map, with an uneven offset for it's subchunk, followed by a graphic reload
in a subchunk with an even offset with any of the following map ID's;
8-10, 19-22, 24-27, 29, 30,
38-40, 50-57, 59, 61-63, 72-80, 103-104, 107,
108-113, 143, 149,  192, 193, 201, 351, 374,  381, 389, 390, 398, 507, 517

In my route I use map 8 above mapdata, which I don't actually know what it corresponds to in RAM so this route might require some revision for non-english versions.

Re: Moving loadlines and graphics using ledges

Posted by: ISSOtm
Date: 2019-01-12 12:15:59
What are the potential applications of this? Better RAM manipulation?

Re: Moving loadlines and graphics using ledges

Posted by: RETIRE
Date: 2019-01-12 12:51:46

What are the potential applications of this? Better RAM manipulation?


well I guess better ram manipulation for writing tiles is an option, although the only real functuonality in that regard is moving 16 steps less for a graphic reload. One other use is that when activated, you ignore all collision in your current subchunk, this can be seen in the video as I step through the collision of the walls to get to the npc's. this means more maps that were previously thought to require a fake sinnoh to enter, now can be entered using this instead.

Re: Moving loadlines and graphics using ledges

Posted by: Parzival
Date: 2019-01-12 22:37:01
Does this actually shift the map data in RAM or is it just graphical?

Re: Moving loadlines and graphics using ledges

Posted by: RETIRE
Date: 2019-01-13 06:32:32

Does this actually shift the map data in RAM or is it just graphical?


It actually can move the barrier of sinnoh, which means we can walk through walls inside sinnoh and get anywhere. Here is a (sadly ASLR based) route that works with base = 226d294 (there might be more base values that write the tile with this route)

1 S
17 W
18 S bike (key item)
1 N graphic reload
415 W
Sr
33 E
383 N
14 E
graphic reload
128 N
1 E
graphic reload
479 S
273 E
256 S
21 E
1 S + Spam menu!
1 N
1 E
1 S + Spam menu!
1 N

choose route:
————–
Darkrai:
213 E
14 S
graphic reload
1 N into tree => warp into darkrais area
————–
Shaymin:

938 E
52 N
47 E

Save reset or press A => battle against shaymin
If press A:

6 S
1 E
south until Seabreak Path, fly/teleport (other movement may softlock)

Re: Using ledges to break collision, graphics and more

Posted by: Parzival
Date: 2019-01-14 08:05:12
So it does move some RAM around… that might be useful for memory corruption! If it can be shifted anywhere and then back, we could potentially use it to inject a small amount of data into anywhere we want (move to items, change values, move somewhere else, things of that nature)

Of course, if it's bound to map data, we're kinda boned, but still…

Re: Using ledges to break collision, graphics and more

Posted by: RETIRE
Date: 2019-03-11 02:46:17
I made a TAS that uses the ledgecancel to get to darkrai in 1:34,814.

you can watch it here: https://www.youtube.com/watch?v=4cMuROJlcgw

the route takes 871 steps, being the first non japanese-exclusive route that is under 1000 steps.
All the optimisations I took into account:

-starting in a void with a small matrix, so I shave off 15 steps just entering closer to 0,0
-not having a savefile, which means a flag is set that makes the data 2 bytes before matrixdata into a jubilife city (outdoors)
-for refreshing, I used GFX set 22 15, given through Map 4. Writing map 4 can be done in 160 steps after save resetting, by hovering over ID 4 of the sidemenu, being the 'save' option
-because of using a different Gfx set than said before, the (EN) [base] has to be 226D324 (it has to end in 24 for every language)
-ledgecancel using only  a single ledge, by moving 2 tiles instead of one, therefore making it the effect of ledgecanceling twice over 1 tile.

after that the barrier will be disabled and no NEW areas will load, flowerparadise's model being frozen. This means that for Shaymin you do have to go below that model, into seabreak path, but it's still a fast route. Since nothing else loads, everything is void until you refresh graphics.

-entering the warp of darkrai from above, shaving off 2 steps

since this requires ASLR manipulation (starting the game at a specific data/time), this makes this route kinda annoying, and not needing a savefile means this route is speedrun only.

I did make a different route of 1600 steps, which doesn't require having no savefile. If you can enter a void of a map with a matrix equal to the ID of an outdoors map, then a route of under 900 is possible for non-speedrun purposes too.

Re: Using ledges to break collision, graphics and more

Posted by: Couldntthinkofaname
Date: 2019-03-11 07:42:51
Nothing to add, just wanted to say that you and the lot at HoO continue to wow me with every new post.


Keep up the great stuff!

Re: Using ledges to break collision, graphics and more

Posted by: RETIRE
Date: 2019-03-12 06:57:48

Nothing to add, just wanted to say that you and the lot at HoO continue to wow me with every new post.


Keep up the great stuff!


Thank you, I am also working on some TAS's now for all bosses and I will heavily abuse ledgecanceling since it allows for so many great things, because it moves loadlines you can even autotweak by refreshing graphics at loadlines, tiledata and chunkdate wont match and it'll act as if you tweaked. This  glitch allows for many niche tricks, I will have to update the voidguide soon!,