Submission #6139: klmz's GBA Castlevania: Aria of Sorrow "warp glitch" in 05:07.56

Game Boy Advance
warp glitch
VBA-rr v23.6 svn480
Castlevania - Aria of Sorrow (U).gba
Submitted by klmz on 11/4/2018 12:55:06 PM
Submission Comments
Last time Soma skipped any other bosses and warped all the way to Chaos, this time he skipped Chaos all together.
This improves the currently published [1681] GBA Castlevania: Aria of Sorrow "warp glitch" by klmz in 06:14.48 by 4099 frames thanks to new tricks, a modified route and precise optimizations. The in-game time becomes very large as a side effect of the final glitching process but its value is not of any concerns of this run.
hellagels encoded a video of the previous revision of the TAS, which is later improved by 1 frame right after the naming menu screen and evolved into this. I think the visual difference is minimal and neglectible to the audience for previewing:

Game objectives

  • Emulator used: VBA-rr v23.6 svn480
  • Aims for fastest input time.
  • Abuses programming errors in the game.
  • Manipulates luck.
  • Takes damage to save time.
  • Uses glitched warps.
  • Corrupts memory.
  • Skips final boss.

Does this TAS reach an ending?

Yes, as seen in the last part of the run.

But does this TAS really beat the game?

Yes, since it reaches the ENDING and unlocks in SRAM new modes that are only for getting the Good Ending.

Branch of the run?

This run can be compared to the Castlevania: Dawn of Sorrow "any%" run. I consider this to be a "glitch-warped any% with memory corruptions".
See the Glitches below for technical details.

Why not Bad Ending?

Conventionally we are always speedrunning the Metroidvania Castlevania series for the Good Endings (aka. True Endings according to the storyline instead of the Bad Endings that are considered "incomplete"), which are best suited for the Moons.


And Good Ending is actually faster to achieve in this TAS with the glitches.



For other glitches used in the run, see the Game Resources article.
The address 0x0200009E keep tracks on which room the game would resume from a suspended game with the SLEEP feature. This SLEEP room number can be treated as a whole 16-bit value, whose low 8-bit byte represents which area Soma is in, and high 8-bit byte represents which room in the area Soma is in. (Alternatively, you may treat the low byte and high byte as two separate values, which doen't affect the points here.)
By going out-of-bound under the 0HP status, it is possible to set bits at 0x0200009E. Simply with proper calculation, this can be abused to allow SLEEP-Warp from the current room to other rooms located at higher addresses in the ROM.
The ending event object is only placed in Room SLEEP No. 0x280B. Thanks to out-of-range reading, an equivalent SLEEP No. for the same room can be 0xCF05, 0x9D07 etc.. I am aiming for getting 0xCF05 in this run, as this value can be easily made from the big rooms in Floating Garden with the rush-OoB method, while the other possible starting points require Giant Bat to get OoB with 0HP or are simply too far away from 0x0200009E on the castle map.
Since the SLEEP Room address is outside supposed memory range of the castle map, I regard this exploit as memory corruption.
Ending event trigger
The ending event in the room always triggers as soon as the room is loaded with Soma's HP > 0. If Soma's HP = 0 when this room is loaded, the ending event won't be triggered and the room is glitched. It is still possible to SLEEP again, and the event can be triggered if Soma's HP > 0 the next time the game is resumed, as if is were the first time.
Since the ending event in the room is triggered in the designed way, I consider this run to be a "glitch-warped" rather than "ending-glitched".

Souls used in the run

Red Souls = "Bullet" Souls, Blue Souls = "Guardian" Souls, Yellow Souls = "Enhancement" Souls, Silver Souls = "Ability" Souls.
Winged Skeleton
A Red Soul with high attack power at low MP cost. Automatically obtained and equipped in the beginning of the quest.
Grave Keeper
A Silver Soul that enables back-dashes. It allows faster movements than simply walking and is easy to obtain from the latern in the mermen in front of the first saveroom.
Killer Fish
A Red Soul with high attack power at low MP cost. It can cover a long range but can only be used underwater.
Giant Worm
A Yellow Soul which restores Soma's HP by 5 point every 60 frames when Soma has zero horizontal momentum and performing no attacks. The in-game menu will reset this timer.
The HP regeneration occurs right before the checks of the game logic for room transitions, leaving no chance to enter the in-game menu between the HP regeneration and room transition. As a result, this Soul can't be used to recover HP for the particular SLEEP-Warp to the ending event room.
A Red Soul with good attack power at low MP cost. It has Fire attribute, making it especially powerful against certain enemies.
Killer Mantle
A Red Soul with OK attack power at OK MP cost. It can modify certain enemies' HP for once, killing them or making them tougher.
A Silver Soul that enables infinite high-jumps. Required for getting to high places and fast for vertical/diagonal travelling.
Iron Golem
A Yellow Soul which allows Soma to take damage without interrupting his movements. However, it is only used in this run as a way to perform the 0HP glitch but never equipped.
A Blue Soul with high attack power. However it is only used as a movement assitant and wall-zipping method.
During the stuck-in-place frames when using Curly allows the timer of Giant Worm Soul to tick on, making these two an interesting combination.
Dead Warrior
A Yellow Soul that allows Soma to override normal main-weapon attacks with equipped Red Soul's attack. The description in the (U) version is just a mis-translation.

Equipments and items used in the run

Some equipments and items can be found placed in certain places of the castle, but the useful ones are all out of the way. Some stuff could be bought in Hammer's Shop, but the Shop wouldn't open until Soma had the conversation with Hammer after beating the Great Armor boss in the Study Area, which is far out of the way.
As a result, all useful stuff in the run are aquired from enemies, candles and laterns.
Causual cloth
Only unequipped in this run for Soma to lower his DEF and receive more damage from enemies.
So-so weapon in the game but still the best one available till the 0HP-warps. Used in the early part of the run.
Dropped by Zombies and Evil Butchers.
An overhead-swing blade that allows multiple hits. However unlike that with most other overhead-swinging weapons, attacks with this weapon will immediately cancel on Soma's landing on the ground.
Dropped by Skull Millions.
Mind Up
A consumable item that restores 20% of maximum MP.
Dropped by certain enemies such as Tiny Devils.
Tastey Meat
A consumable item that restores 290 HP.
Dropped by certain enemies such as Killer Fishes, Needle Balls etc., but the chance is always quite low.
Cream Soda
A consumable item that restore some HP. Who cares how much it restores? :p
Dropped by Student Witches.

Stage by stage comments

Game start and preclude

Nothing changed except for correcting the tiny 1-frame-late mistake to skip the prelude.

First castle room

Nothing to help with the long opening dialogue. The subpixel adjustment on the slope helps later.

Castle Corridor

Baselard is obtained from the Zombie as in other CVAoS TASes. The unnecessary Tunic Cloth as seen in the previous run is skipped this time, for its presence in the inventory would cause extra lags in the body-equipment menu.

Mermen-infested room and saveroom

The nightmare room for luck manipulation. It's easier this time as I don't need farming EXP from Mermen any more. Still the damage boost after saving relies on luck and I think I've got the optimal outcome.
As usual, Grave Keeper Soul is aquired for faster movements and Causual Cloth is unequipped for taking more damage.

Underground Reservoir

The Tiny Devil is utilized for reducing some HP and getting a Mind Up. Then the Skeleton. Its air-juggling attacks contributes to some damage too. Following them are the Killer Fishes to hurt Soma more. The first one gives a piece of Tasty Meat and the second one presents its soul for the first application of the 0HP glitch.
Now SLEEP and....

1st Continue

Unseen hard part: to avoid rolling on the PRNG as much as possible. Using the Tasty Meat got just now starts wall-zipping and warping to....

Long shaft and Giant Worm room in Underground Reservoir

I need Giant Worm Soul here instead of a lot more HP-restoring items. The PRNG window for Giant Worm Soul is pretty tight, but the fight is easy.
The Cagnazzo here may drop Onikiri, a weaker version of Kunitsuna. The weapon is better than Baselard, however, this Cagnazzo is surprisingly much more difficult to take down than its brothers versions, as it keeps hovering over Soma's head like a mosquito until it finally decides to strike down, which makes it a very much time-consuming oppenent without an overhead-swinging weapon. However it is just ignored since I can rely on Baselard and Red Souls instead until I get the superior Kunitsuna in the next area.
Ukoback Soul is also used for 0HP here.
SLEEP then....

2nd Continue

Giant Worm Soul takes some time to regenerate HP. Soma dances in place for luck manipulations, then sets off to warp past the Giant Worm to....

Underwater Needle Balls room still in Underground Reservoir

This is probably the first time Killer Fish Soul shines in a TAS. A Needle Ball gives one more piece of Tasty Meat for later use.
Soma swims out of the water to move to, finally, a new area, Arena!

Arena entrance

Ukoback Soul replaces Killer Fish Soul.

East-wing stairway of Arena

Ukoback Soul burns down the tough Fire-weak Killer Mantle. Killer Mantle Soul is obtained.
Beam Skeletons are manipulated to move out of the way. Gargoyles are annoying obstructs, too. One of them is burnt too to fill up the EXP gap between levels.

East-wing corridor of Arena

The Skull Million in the next is far more cooperative than its little brother. It gives Kunitsuna just at the right time when the wandering Beam Skeleton powers a new 0HP.
SLEEP and get ready to warp out of this nightmare area of luck manipulation.

3rd Continue

Soma falls down, regains HP and then bumps at the "roof" of the entrance room of the Arena, which triggers a warp to the next area. Tasty Meat is used instead of Giant Worm Soul in this process because I need to abuse damage-invincibility later, at which point Giant Worm won't recover enough HP.
The Mind Up is used too by the way for recovering some MP.

Iron Golem room and Hippogriff Soul room of Top Floor

The toughest enemy, Iron Golem, guards the wall hiding Hippogriff Soul behind it. But Killer Mantle can destroy this enemy in merely one hit and Kunitsuna can break the wall easily.
The flying trajectory of Hippogriff Soul is manipulated to be as short as possible.
It's possible to do 0HP on such Golem-type enemies without abusing damage-invincibility, just when they are kick stones, but that takes too much time. So the "damage-invincibility + soul-aquired-pause" method is used.
SLEEP again.

4th Continue

Showtime! Used to this already?
Highjumps inside walls make Soma zoom upward very fast. We then just go all the way down.

Entrance of Top Floor

It wouldn't save time to avoid the landing-stun by thrusting into the ceiling. Collecting hearts from the clocks is more important.
This whole section and the following inter-area room forms a "PRNG blackhole", which means that when you get through it without wasting frames, you are almost certainly stuck with the same pseudo-random number no matter what you've tried in in. Still, there are leaks to escape from it and I successfully seize a favorable PRNG value for the next area.

East-wing corridor of Inner Quarter

Since I've used up recovery items, I have to get a new one for triggering the ending event eventually. The Student Witch gives Cream Soda. Great.

East-wing stairway of Inner Quarter

The Curly monsters roam on the stairs. Ther have weird collision boxes, that change irregularly per frame.
Luck manipulation for the next room is still a big pressure, as enemies here just won't roll the PRNG, while I need the small hearts from the candle-holders, whose debris awakes the PRNG.

Pond room of Inner Quarter

It's also possible to 0HP-warp to Floating Garden from either the last stairway or the corridor leading to the warp room in several fashions, but none is as fast as the way from here.
All I do here is to wait for the chance to sneak behind the Curly next to the pond and do 0HP with her soul.

5th Continue

Now it's time to abuse the Curly-backdash loop which works like the Catoblepas-backdash loop. By increasing the frequency, this loop is actually becoming slower and slower for movement, but the Giant Worm timer will increase faster and faster. When the two aspects are balanced right, Soma can warp to the next area faster than otherwise.
The Curly-backdash loop consumes a lot of MP. The Mind Up used earlier and the hearts collected along the way fill up enough MP for this.

Near the entrance to Floating Garden

With Hippogriff and Curly-backdash, this section is passed through quickly.

Big Room SLEEP No. 0x0805 in Floating Garden

This room is very close to the entrance, and satisfies every requirement for the SLEEP Warp. The goal here is simply to do: 0x0805 bitwise_or 0xC700 = 0xCF05, but Soma has to get OoB under 0HP status first.
It's faster to do 0HP with the Dead Warrior than the Devil. Since the Dead Warrior has no projectile, the Soul-aquired-pause method is used.
Now SLEEP once more!

6th Continue

Nothing is hard with the movement. The target map blocks that need to be explored to set the bits of 0x0200009E are divided to two parts. The first part 0x0700 is directly reachable from the upper-left corner of this room, and the second part 0x0C00 is separated from the first part by three blocks. The optimal way to explore them all is to highjump diagonally to the first part, fall down to the ground, go left, then highjump diagonally again to the second part, as moving on the ground is overall faster than jumping in the air. This is exactly what is done in the run.
However, the Giant Worm causes a little trouble here: its effect is no longer needed, but its timer could just have enough ticks to regenerate 5 superfluous HP. Either unquipping it or resetting its timer takes quite a few frames. So what to do? Just use the Curly-backdash once less, which is merely 1-frame-worth.
The remaining MP is perfectly enough for this. No more, no less. ;)
Time to SLEEP for the last time as soon as Soma hits the border pixel of the last block....

7th Continue

Enjoy the ending! Thank you for watching! :D

Other comments

Special thanks to Pike who suggested some Souls usages, the Iron Golem 0HP-warp and several alternate routes.
Also thanks to hellagels for the "preview" encode.

Screenshot suggestion

Frame 12434:

Memory: Judging
Memory: Optimization seems great.
The author provided a detailed explanation on how the warp to the ending should qualify as game completion but given how all aspects of the ending play out, it would be clear to me even without this explanation that the ending is properly triggered.
The route here was fairly interesting with the various tricks and out of bounds. Skipping the final boss was clever too. The audience also really liked the run as well.
Spikestuff: SHOWTIME!... wait wrong game.
Last Edited by adelikat on 10/28/2023 8:34 PM
Page History Latest diff List referrers