# Beating Illusion of Gaia in 17 Minutes

- Video Games, Security

Last revision:

I crafted a tool-assisted speedrun (TAS) of the Super NES action-adventure game Illusion of Gaia (also known as Illusion of Time in Europe) which beats the game as fast as possible on the American version.

The final time is 16:48 when using TAS timing (from initial power on to the last input) and 16:27 when using RTA timing (from selecting Start Journey up to the last boss receiving the last hit). For reference, as of this writing, the current human world record is 1:18:09 when using RTA timing, performed by solarcell007.

The general strategy I used is to duplicate 50 Red Jewels without leaving the first town through save data corruption in order to warp to the last boss of the game and defeat it.

The TAS can be downloaded here and can be played back on emulator lsnes rr2-β23 with SGB Core. It was also accepted and published on TASVideos, which includes a YouTube video encode for those who just want to watch the end result.

Below is a full technical explanation of the TAS, along with acknowledgments.

## Version

The American version of the game is used instead of the Japanese version, as even though the latter has a shorter wait time before being able to advance to the file select screen, the former has instant text boxes which saves a lot more time overall.

As for the European versions, they are slower than the American version due to a lazy NTSC to PAL conversion, making them poor choices for speedrunning purposes.

## Diary data

Understanding how the game saves data is critical to understand the route described below.

Each Diary takes 0x0200 bytes of data. They are stored next to each other in SRAM, starting from 0x0200. The game can save up to 3 Diaries. In addition, there is also the active Diary stored in WRAM at address 0x0A00 while the game is running.

Here is the Diary layout relevant to this route:

• 0x0000 to 0x0001: Unsaved temporary data
• 0x0002[0x01]: Flag for the School introduction cutscene (set when starting a new game)
• 0x0002[0x02]: Flag for Seth's House's introduction cutscene (not used in this run)
• 0x0002[0x04]: Flag for Will's House's introduction cutscene
• 0x0002[0x08]: Flag for Lance's House's introduction cutscene (not used in this run)
• 0x0002[0x10]: Flag for Erik's House's introduction cutscene
• 0x0002[0x20]: Flag for Seaside Cave's introduction cutscene
• 0x001A[0x80]: Flag for collecting the Red Jewel in the fisherman's pot (not used in this run)
• 0x001B[0x10]: Flag for talking to Gaia at South Cape (set before the first save of this run)
• 0x001D[0x02]: Flag for receiving the Herb reward from Jeweler Gem at 3 Red Jewels
• 0x001D[0x04]: Flag for receiving the +1 DEF reward from Jeweler Gem at 5 Red Jewels
• 0x001D[0x08]: Flag for receiving the +1 maximum HP reward from Jeweler Gem at 8 Red Jewels
• 0x001D[0x10]: Flag for receiving the +1 STR reward from Jeweler Gem at 12 Red Jewels
• 0x001D[0x20]: Flag for receiving the Psycho Dash upgrade from Jeweler Gem at 20 Red Jewels
• 0x001D[0x40]: Flag for receiving the Dark Friar upgrade from Jeweler Gem at 30 Red Jewels
• 0x001E[0x10]: An attract mode flag (not used in this run)
• 0x002F[0xF0]: More attract mode flags (not used in this run)
• 0x0050[0x01]: Flag for collecting the Red Jewel in Lance's House's basement
• 0x0050[0x02]: Flag for collecting the Red Jewel on the roof of the School
• 0x00B0: Number of Red Jewels delivered to Jeweler Gem in binary-coded decimal (BCD) format
• 0x00B4 to 0x00C3: Inventory (1 byte per item slot)
• 0x00C4 to 0x00C5: Equipped item slot in little-endian (0xFFFF = not equipped)
• 0x00C6: Copy of equipped item value
• 0x00CA: Will's maximum HP
• 0x00CC: Copy of Will's maximum HP
• 0x00CE: Will's current HP
• 0x00D0: Copy of Will's current HP
• 0x00DC: Will's DEF
• 0x00DE: Will's STR
• 0x0116: Will's Psycho Dash power
• 0x011C: Freedan's Dark Friar power
• 0x0124[0x01]: Flag for Sound = Mono (not used in this run)
• 0x0126[0x01]: Flag for Button = Type 2 (not used in this run)
• 0x01FC to 0x01FF: Checksum

Here are the relevant inventory item values:

• 0x00: Empty
• 0x01: Red Jewel
• 0x06: Herb

Note that the attract mode flags are not unset when starting a new game, so they are listed here as they interact with the checksum and were taken into consideration during routing.

Also note that the random number generator (RNG) state is not stored in a Diary, and is therefore reset each time a Diary is started.

## Tricks and techniques

### SRAM bit swap

This exploit is what allows the route described below to be possible in the first place.

When saving a Diary, the game appends a checksum at the very end of it. Its first half is calculated by adding all non-checksum 16-bit words of the Diary with a magic number. Its second half is calculated by XORing all non-checksum 16-bit words of the Diary with a magic number. This checksum is used to determine whether the saved Diary is valid or not.

An interesting property of this checksum is that if 2 bits in the same 16-bit position are swapped between 2 different 16-bit words, the checksum does not change, allowing such a corrupted Diary to still be valid.

Since Diaries are saved linearly in chunks of 16 bits in SRAM, such a corruption is possible to achieve by performing a precise mid-frame reset while saving a Diary in-between the 2 desired 16-bit words. Note that the required timing appears to be too precise to be viable for speedruns performed by humans.

### Diary recycling

After performing a mid-frame reset while saving or deleting a Diary, if its calculated checksum does not match its saved checksum, the main menu behaves as if the Diary does not exist, allowing the slot to be available for a new game.

It is, however, possible to partially restore such a corrupted invalid Diary by overwriting its beginning with another save, and interrupt said save in a way that will cause the old checksum to match again, resurrecting the corrupted Diary as valid and playable. The easiest way to do this is to start copying a different valid Diary over the corrupted one and immediately perform a precise mid-frame reset in-between the 2 desired bytes before the copy operation completes.

### Item duplication

By using SRAM bit swap with or without Diary recycling, it is possible to duplicate items in any of the following ways:

• Swap in and out bits of a specific item counter to make it reach a higher value.
• Swap out a bit flag marking the collection of the item, then collect it again normally.
• Swap in bits from outside the inventory to a specific item slot. Note that depending on whether the item slot position used is even or odd, a different set of bits must be swapped out since each item slot consumes only half of a 16-bit word.

This run optimizes item duplication by combining all of these techniques simultaneously with the following procedure:

1. Save a Diary with empty item slots to be filled with duplicated items at or near the beginning of the inventory.
2. Set up Diary bits by playing the game normally and reordering items correctly.
3. Reset in the middle of a save while the inventory is only partially overwritten.
4. Recycle the Diary to complete SRAM bit swap while unsetting possible item collection flags.

Note that it is possible to SRAM bit swap the contents of an item slot to have the equipment pointer mismatch the copied equipped item value. Unfortunately, the pointer has priority when attempting to use the equipped item, so this does not appear to be useful.

On the Diary select screen, the cursor defaults to the last Diary started. However, when selecting to copy a Diary, the cursor defaults to Diary 1 even if it is empty. As such, it is possible to abuse this behavior by making sure Diary 1 is the most copied Diary throughout the run to save a few frames.

### Inventory management

With the exception of Mystic Statues which have their own dedicated slots, the inventory is managed from a 4x4 grid. Here is the position of each slot in said grid:

 1  2  3  4
5  6  7  8
9 10 11 12
13 14 15 16


Horizontal movements go through all 16 slots in order, with the 16th slot connected to the 1st. Meanwhile, vertical movements are restricted to their columns, with the bottom of a column connected to its top. Diagonal movements are not possible. This means that moving the cursor around from one arbitrary slot to another only requires up to 3 moves. As cursor movements in the inventory are frame-perfect, and because all directions on the Control Pad have to be effectively released in order to move the cursor in a specific direction twice, the worst case scenario requires 4 frames.

Meanwhile, whenever Will receives an item, it will fill the first available slot in his inventory. However, the resulting positioning may not be in optimal for selecting it afterwards. In addition, the 1st and 3rd item slots sometimes need to be empty in this run for duplicating items in them. On top of that, items in the 2nd and 4th slots sometimes need to be filled with fixed items as well to successfully pull off an SRAM bit swap. As such, ordering of items in the inventory is carefully calculated throughout the run for optimal cursor movements.

One way to mitigate this issue is to consider that while reordering items, the cursor remains at its final position after a swap, which may save some frames when chaining multiple inventory swaps.

Also, considering the equipment cursor defaults to the 1st slot while unequipped, another possible mitigation is to place a Red Jewel at an inconvenient slot to reach in the inventory from the 1st slot, equip it, and use SRAM bit swap to make sure that the equipped Red Jewel gets duplicated after use. Since the equipped slot data is stored after the inventory data in a Diary, the Red Jewel will remain equipped after duplication, potentially saving the time to re-open the inventory menu and re-equip the Red Jewel afterwards each duplication.

Here are the symbols used below to represent inventory slots in the diagrams shown in the Route section below:

• _: Empty
• J: Red Jewel
• H: Herb

Here are the symbols used to represent actions on the inventory in the diagrams shown in the Route section below:

• +: Items acquired through normal means
• -: Items removed through normal means
• R: Items reordered using the in-game Order option
• S: Save interrupted by a mid-frame reset
• /: The position where the save got interrupted

Note that whenever reordering is performed immediately before an SRAM bit swap in the route below, it is combined with equipping the last Red Jewel to be sent to Jeweler Gem for the current duplication cycle. This is to avoid needlessly closing and reopening the inventory after using the Red Jewel just for that. This detail is omitted from the diagrams below for readability, even though the resulting illustrated flows are slightly inaccurate due to this.

### South Cape routes

From the South Cape Dark Space, there are a few paths to choose from to leave the School. They are:

1. Going back down the stairs, running through the School and exiting through the front door.
2. Jumping off the School's roof, then running alongside the School's exterior wall.
3. Jumping off the School's roof, then jumping again on the next roof where Jeweler Gem is located.

The route going back through the School is about half a second slower than the one alongside the exterior wall even without collecting the Red Jewel, so it is never a good idea to use the former.

The difference is not so clear between the other two routes if talking to Jeweler Gem is not required. It turns out that the only locations that are faster to reach by the Jeweler Gem route are Seth's House and Seaside Cave. All other locations are faster by using the School exterior wall route. In particular, it is 4 frames faster to enter Lance's House that way compared to the other route according to my tests.

### Doorway cutscene skip

Normally, attempting to enter specific doorways in South Cape for the first time triggers the linked introduction cutscene. It is however possible to skip such a cutscene by opening the related door, then start running into the doorway. This skips the cutscene trigger on the way in, and also on the way out since Will is placed outside of the doorway when exiting the house normally.

This technique is used to skip Lance's House introduction cutscene multiple times throughout the run. Even though it is only a few frames long at best, this technique actually ends up saving about half a minute. This is because if this skip was not possible, an extra round trip around South Cape would be necessary prior to the initial save to trigger it in order to ensure that the associated flag in SRAM does not break checksum validation after corrupting a Diary.

Note that this run sometimes requires Will to slow down a bit when entering doorways to ensure the cutscene skip is not accidentally performed whenever the trigger is required for an SRAM bit swap. Also note that doing so may or may not trigger entering the doorway, depending on the house. This is why Will must enter his house but not Erik's during the run.

### Erik's House cutscene trigger

Erik's House introduction cutscene can be triggered either from its front door or its roof entrance. Using the front door to do so is always faster throughout the run however due to the shorter detour.

### Map transition lag management

Depending on the order in which areas are entered and exited, lag may increase by about a second per map transition, which may potentially affect routing. I did not find a relevant case where a longer walking/running distance would result in a shorter travel duration due of this phenomenon however.

## Route

While there are many ways to duplicate Red Jewels, this particular route does so by minimizing running distance to 8 trips around South Cape, and the number of resets to 14, all without triggering any cutscene longer than a map transition.

Note that it is important to not collect any unnecessary Red Jewels on the way in order to follow the route properly.

### Initial setup (round trip 1)

A new game is started in Diary 1 with the default sound and buttons settings, and immediately saved by talking to Gaia at the nearest Dark Space. It is then copied over Diary 2 and Diary 3. Diary 3 is then started only to have Will trigger Erik's House introduction cutscene before going back to the Dark Space to save the game.

Diary 1 will stay as-is for the rest of the run. Its purpose is to unset flags when recycling Diary 2 with it later.

Diary 2 will be the Diary used to beat the game. Thoughout the rest of the run, only Diary 2 will be started and played.

Diary 3 will stay as-is for the rest of the run. Its purpose is similar to Diary 1, except that it can also set Erik's House flag when used to recycle Diary 2, which will be used to manage Jeweler Gem's Red Jewel counter during a specific SRAM bit swap later.

Current relevant state of Diary 1 and Diary 2:

• Cutscenes played: None.
• Collected Red Jewels: None.
• Red Jewels delivered to Jeweler Gem: 0.
• Will's inventory: Empty.

Current relevant state of Diary 3:

• Cutscenes played: Erik's House.
• Collected Red Jewels: None.
• Red Jewels delivered to Jeweler Gem: 0.
• Will's inventory: Empty.

### Reaching 1 Red Jewel (round trip 2)

Will collects the Red Jewel in Lance's House's basement, which is reordered at the end of the inventory before saving. This is done while ensuring that Lance's House introduction cutscene is skipped here and in every following instances of collecting this Red Jewel.

_ _ _ _     J _ _ _     _ _ _ _
_ _ _ _  +  _ _ _ _  R  _ _ _ _
_ _ _ _  →  _ _ _ _  →  _ _ _ _
_ _ _ _     _ _ _ _     _ _ _ J


Current relevant state of Diary 2:

• Cutscenes played: None.
• Collected Red Jewels: Lance's House.
• Red Jewels delivered to Jeweler Gem: 0.
• Will's inventory: 1 Red Jewel.

### Reaching 2 Red Jewels (SRAM bit swap 1)

The Red Jewel is reordered back to the 1st slot before performing a mid-frame reset during a save just as the 1st and 2nd slots get overwritten.

_ _ _ _     J _ _ _     J _/_ _
_ _ _ _  R  _ _ _ _  S  _ _ _ _
_ _ _ _  →  _ _ _ _  →  _ _ _ _
_ _ _ J     _ _ _ _     _ _ _ J


The Diary is recycled by overwriting it with Diary 1 up until the collected Red Jewel flags are cleared.

Resulting SRAM bit swap:

• Lance's House Red Jewel flag → 0x0100 → Red Jewel in 1st slot

Current relevant state of Diary 2:

• Cutscenes played: None.
• Collected Red Jewels: None.
• Red Jewels delivered to Jeweler Gem: 0.
• Will's inventory: 2 Red Jewels.

### Reaching 4 Red Jewels (round trip 3)

Will collects the School Red Jewel and Lance's House Red Jewel, then reorders the one from the 1st slot to the 9th before equipping it and saving. Note that the 9th slot will remain equipped on the saved Diary until the end of the run, which ends up saving a few frames by the end.

J _ _ _     J J J _     _ J J _
_ _ _ _  +  _ _ _ _  R  _ _ _ _
_ _ _ _  →  _ _ _ _  →  J _ _ _
_ _ _ J     _ _ _ J     _ _ _ J


Current relevant state of Diary 2:

• Cutscenes played: None.
• Collected Red Jewels: Lance's House, School.
• Red Jewels delivered to Jeweler Gem: 0.
• Will's inventory: 4 Red Jewels.

### Reaching 7 Red Jewels (SRAM bit swap 2)

Will sends 2 Red Jewels to Jeweler Gem and reorders one Red Jewel back to the 1st slot before performing a mid-frame reset during a save just as the 1st and 2nd slots get overwritten.

_ J J _     _ J _ _     J J _ _     J J/J _
_ _ _ _  -  _ _ _ _  R  _ _ _ _  S  _ _ _ _
J _ _ _  →  _ _ _ _  →  _ _ _ _  →  J _ _ _
_ _ _ J     _ _ _ J     _ _ _ _     _ _ _ J


The Diary is recycled by overwriting it with Diary 1 up until the collected Red Jewel flags are cleared.

Resulting SRAM bit swap:

• Lance's House Red Jewel flag → 0x0100 → Red Jewel in 1st slot
• School Red Jewel flag → 0x0200 → 2 Red Jewels to Jeweler Gem

Current relevant state of Diary 2:

• Cutscenes played: None.
• Collected Red Jewels: None.
• Red Jewels delivered to Jeweler Gem: 2.
• Will's inventory: 5 Red Jewels.

### Reaching 8 Red Jewels (round trip 4)

Will collects the Red Jewel in Lance's House, triggers Will's House introduction cutscene and reorders the Red Jewel from the 1st slot before saving.

J J J _     J J J J     _ J J J
_ _ _ _  +  _ _ _ _  R  J _ _ _
J _ _ _  →  J _ _ _  →  J _ _ _
_ _ _ J     _ _ _ J     _ _ _ J


Current relevant state of Diary 2:

• Cutscenes played: Will's House.
• Collected Red Jewels: Lance's House.
• Red Jewels delivered to Jeweler Gem: 2.
• Will's inventory: 6 Red Jewels.

### Reaching 13 Red Jewels (SRAM bit swap 3)

Will sends 4 Red Jewels to Jeweler Gem and reorders one Red Jewel back to the 1st slot before performing a mid-frame reset during a save just as the 1st and 2nd slot get overwritten.

_ J J J     _ J _ _     J J _ _     J J/J J
J _ _ _  -  _ _ _ _  R  _ _ _ _  S  J _ _ _
J _ _ _  →  _ _ _ _  →  _ _ _ _  →  J _ _ _
_ _ _ J     _ _ _ J     _ _ _ _     _ _ _ J


The Diary is recycled by overwriting it with Diary 1 up until the collected Red Jewel flags are cleared. Note that doing so also resets all introduction cutscenes flags.

Resulting SRAM bit swap:

• Lance's House Red Jewel flag → 0x0100 → Red Jewel in 1st slot
• Will's House flag → 0x0400 → 4 Red Jewels to Jeweler Gem

Current relevant state of Diary 2:

• Cutscenes played: None.
• Collected Red Jewels: None.
• Red Jewels delivered to Jeweler Gem: 6.
• Will's inventory: 7 Red Jewels.

### Reaching 15 Red Jewels (round trip 5)

Will collects the School Red Jewel and Lance's House Red Jewel, triggers Erik's House introduction cutscene, and reorders the Red Jewels from the 1st and 3rd slots before saving.

J J J J     J J J J     _ J _ J
J _ _ _  +  J J J _  R  J J J _
J _ _ _  →  J _ _ _  →  J _ _ J
_ _ _ J     _ _ _ J     J _ _ J


Current relevant state of Diary 2:

• Cutscenes played: Erik's House.
• Collected Red Jewels: Lance's House, School.
• Red Jewels delivered to Jeweler Gem: 6.
• Will's inventory: 9 Red Jewels.

### Reaching 22 Red Jewels (round trip 6 + SRAM bit swap 4)

Will meets Jeweler Gem. As Will delivered 6 Red Jewels to him so far, Jeweler Gem rewards him with an Herb for delivering 3 Red Jewels, and +1 DEF for delivering 5 Red Jewels. Will then leaves without giving him his remaining Red Jewels in person. However, he sends him 6 Red Jewels immediately afterwards and reorders one more Red Jewel back to the 3rd slot before performing a mid-frame reset during a save just as the 3rd and 4th slots get overwritten. Note that the +1 DEF is not saved because of this.

_ J _ J     H J _ J     H J _ J     H J J J     H J J J
J J J _  +  J J J _  -  _ _ J _  R  _ _ _ _  S /J J J _
J _ _ J  →  J _ _ J  →  _ _ _ _  →  _ _ _ _  →  J _ _ J
J _ _ J     J _ _ J     _ _ _ _     _ _ _ _     J _ _ J


The Diary is recycled by overwriting it with Diary 1 up until the collected Red Jewel flags are cleared. Note that doing so also resets all Jeweler Gem reward flags, in addition to the introduction cutscene flags.

Resulting SRAM bit swap:

• 6 Red Jewels from Jeweler Gem → 0x0600 → Herb in 1st slot
• Lance's House Red Jewel flag → 0x0100 → Red Jewel in 3rd slot
• School Red Jewel flag → 0x0200 → 2 Red Jewels to Jeweler Gem
• Erik's House flag → 0x1000 → 10 Red Jewels to Jeweler Gem

Current relevant state of Diary 2:

• Cutscenes played: None.
• Collected Red Jewels: None.
• Red Jewels delivered to Jeweler Gem: 12.
• Will's inventory: 10 Red Jewels, 1 Herb.

Note that there exists a faster alternate route to reach the same state minus the Herb by triggering Seth's House and Will's House introduction cutscene flags at the previous save instead of the extra South Cape trip to talk to Jeweler Gem during this phase of the run, but the Herb will be needed to swap out two 0x0400 bits simultaneously later, and getting it now skips the detour to trigger and watch these cutscenes in addition to skipping an extended dialog with Jeweler Gem later for the rewards at 8 Red Jewels and 12 Red Jewels.

### Reaching 24 Red Jewels (round trip 7)

Will collects the School Red Jewel, then does a detour to trigger the Seaside Cave introduction cutscene before collecting Lance's House Red Jewel, then triggers Will's House introduction cutscene, and reorders items away from the first 3 item slots before saving. The Herb is specifically placed at one of the slowest slots to equip since it never needs to be.

H J J J     H J J J     _ _ _ J
J J J _  +  J J J J  R  J J J J
J _ _ J  →  J J _ J  →  J J H J
J _ _ J     J _ _ J     J J J J


Note that there is an opportunity to spawn and acquire the fisherman Red Jewel on the way, but it is skipped because it cannot be easily duplicated this early in the game, and the required manipulation of the pseudo-random number generator to spawn it requires several seconds to complete, while picking up an additional School Red Jewel later takes less than a second.

Current relevant state of Diary 2:

• Cutscenes played: Will's House, Seaside Cave.
• Collected Red Jewels: Lance's House, School.
• Red Jewels delivered to Jeweler Gem: 12.
• Will's inventory: 12 Red Jewels, 1 Herb.

### Reaching 35 Red Jewels (SRAM bit swap 5)

Will sends 10 Red Jewels to Jeweler Gem and reorders one Red Jewel to the 1st slot and the Herb to the 3rd slot before performing a mid-frame reset during a save just as the 3rd and 4th slots gets overwritten.

_ _ _ J     _ _ _ J     J _ H J     J _ H J
J J J J  -  _ _ _ _  R  _ _ _ _  S /J J J J
J J H J  →  _ _ H _  →  _ _ _ _  →  J J H J
J J J J     _ _ _ J     _ _ _ _     J J J J


The Diary is recycled by overwriting it with Diary 3 (not Diary 1) up until the collected Red Jewel flags are cleared. Note that this also resets all introduction cutscene flags except for the one for Erik's House which becomes set.

Resulting SRAM bit swap:

• 10 Red Jewels from Jeweler Gem → 0x1000 → Erik's House flag
• Lance's House Red Jewel flag → 0x0100 → Red Jewel in 1st slot
• School Red Jewel flag + Will's House flag → 0x0200 + 0x0400 → 0x0600 → Herb in 3rd slot
• Seaside Cave flag → 0x2000 → 20 Red Jewels to Jeweler Gem

Current relevant state of Diary 2:

• Cutscenes played: Erik's House.
• Collected Red Jewels: None.
• Red Jewels delivered to Jeweler Gem: 22.
• Will's inventory: 13 Red Jewels, 2 Herbs.

### Reaching 36 Red Jewels (round trip 8)

Will collects the School Red Jewel, then triggers Will's House introduction cutscene before saving.

J _ H J     J J H J
J J J J  +  J J J J
J J H J  →  J J H J
J J J J     J J J J


Current relevant state of Diary 2:

• Cutscenes played: Will's House, Erik's House.
• Collected Red Jewels: School.
• Red Jewels delivered to Jeweler Gem: 22.
• Will's inventory: 14 Red Jewels, 2 Herbs.

### Reaching 50 Red Jewels (SRAM bit swap 6)

Will sends all of his 14 Red Jewels to Jeweler Gem as it is faster to do so than going back outside to deliver them in person. A mid-frame reset during a save is then performed just as the counter of Red Jewels delivered to Jeweler Gem gets overwritten.

J J H J     _ _ H _    /J J H J
J J J J  -  _ _ _ _  S  J J J J
J J H J  →  _ _ H _  →  J J H J
J J J J     _ _ _ _     J J J J


The Diary is recycled by overwriting it with Diary 1 up until the introduction cutscene flags are cleared (instead of up to the collected Red Jewel flags).

Resulting SRAM bit swap:

• Will's House flag → 0x0400 → 4 Red Jewels to Jeweler Gem
• Erik's House flag → 0x1000 → 10 Red Jewels to Jeweler Gem

Current relevant state of Diary 2:

• Cutscenes played: None.
• Collected Red Jewels: School.
• Red Jewels delivered to Jeweler Gem: 36.
• Will's inventory: 14 Red Jewels, 2 Herbs.

### The final stretch

Will now has collected enough Red Jewels to claim Jeweler Gem's secret reward. Note that since Will needs to talk to him anyway to claim it, it is faster this time to hand over all the Red Jewels directly to him instead of sending them over one by one. However, Will cannot talk to Jeweler Gem immediately as the option to hand over the Red Jewels only appears after Jeweler Gem is able to give Will the Herb reward again first, which would fail as his inventory is full.

As such, Will sends the equipped Red Jewel first to free up an item slot, then talks to Jeweler Gem. By doing so, Will immediately collects his first six rewards in one go: an Herb, +1 DEF, +1 maximum HP, +1 STR, a Psycho Dash upgrade, and a Dark Friar upgrade. Unfortunately, these rewards are completely useless at this point in the run.

Afterwards, Will can then finally hand over all of his remaining Red Jewels at once to unlock the seventh and final reward, achieved by delivering 50 Red Jewels: a secret warp to Jeweler Gem's mansion. Exiting it through the nearby front door causes an additional warp to the last floor of the Tower of Babel. This allow Will to skip almost all of the game.

J J H J     J J H J     J J H J     _ _ H _
J J J J  -  J J J J  +  J J J J  -  _ _ _ _
J J H J  →  _ J H J  →  H J H J  →  H _ H _
J J J J     J J J J     J J J J     _ _ _ _


Note that from this point, an alternate route exists where Will can warp to Dao by talking to the nearby spirit, then travel all the way to the Great Wall of China to acquire Spin Dash, then backtrack to Mt. Temple to acquire Aura Barrier, then finally use it by manipulating acid spiders in a precise manner in the room containing the Aura Barrier Dark Space to overflow the memory reserved for sprites to trigger an arbitrary code execution exploit to warp directly to the end screen. While this exploit can be used to skip Dark Gaia and the credits, it is not worth the long detour to do so.

Instead, Will simply runs directly to the last room of the Tower of Babel and collects the 6th Mystic Statue from Olman before being warped to the top of the tower. Fortunately, Kara is present there even though Will never met her beforehand, and the game does not check if Will is in possession of all 6 Mystic Statues before merging with her, so after quickly talking to all the other spirits there in the order they appear, Will is allowed to proceed to the final battle against Dark Gaia.

### Dark Gaia

Will transforms into Shadow and unlocks the Firebird just before confronting Dark Gaia, so the fight is pretty much normal. However, Will's HP and DEF are so low that all of Dark Gaia's attacks kill Shadow in one hit, and Aura cannot be used as it was never acquired, so dodging is critical.

While phase 1 of the fight is trivial to optimize, phase 2 has a few important considerations.

First, if Shadow is positioned properly, it is possible to land up to 5 attacks every time Dark Gaia opens their mouth during phase 2, with just barely enough time to dodge their incoming mouth beam attack even without Aura, allowing for a 3-cycle kill.

Second, the length of phase 2 is pseudo-random. Indeed, while Dark Gaia is guaranteed to attack with energy balls once during the first cycle and 4 times during follow-up cycles, there is a defined 1/4 probability that Dark Gaia may perform additional energy ball attacks instead of opening their mouth every cycle. Fortunately, no manipulation of the pseudo-random number generator is necessary to achieve this outcome with this route.

## Special thanks

• Raeven0 for discovering the SRAM bit swap exploit, helping me with fisherman manipulation, and inspiring me to do this TAS.
• solarcell007 for explaining to me how to perform the doorway skip, and helping me with fisherman and Dark Gaia manipulations.
• Halamantariel for their previous 100% TAS of Illusion of Gaia that I was able to use as reference.
• Members of the Illusion of Gaia Randomizer Discord server for their support.

## Essential International Standards and Registries for Web Developers

- Programming, Quality Assurance, Security

The following is a collection of free international standards, registries and references that I collected throughout the years while developing websites and web services. These references, while very precise and technical by their nature, are extremely useful in order to ensure that a specific…

## Resolving Playstation Vita Error Code NP-9968-2

- Video Games, Security, Anecdotes

For about 2 years, I was not able to install any new software on my PlayStation Vita, for seemingly no reason. I could make new purchases from the PlayStation Store, but the download would always fail, and only on my Vita. No issues whatsoever with my PlayStation 3 nor my PlayStation 4, but for some…

## The Hack 'n' Slash Puzzle Collection

- Video Games, Security

This is a collection of all the secret hacking puzzles released between 2012 and 2015 related to the video game Hack 'n' Slash and its prototype. As far as I'm aware, all puzzles were designed by the game's project lead Brandon Dillon. All the material is archived here for preservation purposes…

## Game Design Analysis - The Lemniscate A-set ARG

- Game Design, Video Games

Alternate reality games (ARGs) are interesting to review. Half marketing, half entertainment, and 100% live, their very nature makes them hard to experience if you miss them. In the case of the Lemniscate A-set ARG however, almost all of the content is still available today. As I took part in it…

## The Slow Certificate Authority

- Anecdotes, Security

Last year, I wrote about multiple issues I encountered upon switching web hosts. One of these issues was delay violations from Sectigo (formerly Comodo CA) for revoking old certificates compromising the HTTPS connection to my website. This spawned a saga with Mozilla, the organization behind Firefox…

See all of my articles