Tool-assisted game movies
When human skills are just not enough

Submission #6538: Jigwally's NES L'Empereur "save glitch" in 01:52.08

Console: Nintendo Entertainment System
Game name: L'Empereur
Game version: USA
ROM filename: L'Empereur (U) [!].nes
Branch: save glitch
Emulator: BizHawk 2.3.2
Movie length: 01:52.08
FrameCount: 6736
Re-record count: 50644
Author's real name: Basil Gruber
Author's nickname: Jigwally
Submitter: Jigwally
Submitted at: 2019-10-23 02:43:41
Text last edited at: 2019-11-08 18:38:20
Text last edited by: fsvgm777
Download: Download (3943 bytes)
Status: published
Click to view the actual publication
Submission instructions
Discuss this submission (also rating / voting)
List all submissions by this submitter
List pages on this site that refer to this submission
View submission text history
Back to the submission list
Author's comments and explanations:

I have a feeling this will be too boring to be published but I had a lot of fun with it. This is my first time doing something this technical & I took the game apart quite a bit.

This TAS uses a mid-frame reset to corrupt the save file in a way that it can be used to trigger the game's ending as quickly as possible.

There is an array of Officers beginning at 6005. Each officer is part of a linked list: the first attribute of each Officer is a 16-bit pointer to another Officer (or null, if they're the last in the list), which are dereferenced one after the other in order to loop through officer lists. By resetting in the space between the low and high byte being overwritten by new save data, I can create a glitched pointer which causes incorrect data in the officer array to be interpreted as an officer.

The other issue is that the game has a checksum for sensing corrupt files, so we have to bypass it by making sure that the corrupt file sums to the same value as the original save. This is easier to resolve if the glitch is performed on an officer with a lower RAM adress (60XX-62XX), because all of these officers belong to France, so it limits the amount of changes that can randomly happen to relevant RAM during any AI turns.

Scenario 4 is chosen because all of Napoleon's relatives become player-controlled, which allows me to execute the glitch in a single in-game month.

The route is as follows:




At this point our officer list contains:

61C1 -> 009C -> 6FE5 -> ???? (keeps following values until it finds zero)

What we want from the ball is to have the glitched officer at 6FE5 to be assigned exactly 3 experience, because its experience stat is located at 6FEB (game state) and 3 is the flag for the game ending.

Because we are randomly assigning stat boosts to some critical memory regions, we also have to make sure the event we manipulate doesn't crash the game in the process.


There could possibly be a route in which the AI commander performs an action that fixes the checksum exactly for us, preventing me from having to take a turn to do it; however it already took me a really long time testing RNG branches to even come up with this & that's way too complex to work out unless I find some way to automate the testing process. I am happy with this run for now.

Because all we need is a link leading to 9C, there could very well be a faster solution that traverses some less obvious path through the RAM data, but I searched for a while & this was the only one I could find that worked. I haven't gone very far in investigating the Japanese release but there could very well be an exclusive solution.

I can almost certainly perform this same type of glitch on other Koei games, although some of the ones I've looked at use dual checksums which complicate the bypass process.

Temp encode:

(Link to video)

Memory: Judging

Memory: Optimization appears fine though it can be hard to tell due to the nature of the glitch.

This game has multiple different scenarios that change starting conditions and other mechanics. However, all scenarios share the same ending so I think only one variant of this branch needs to exist. I do not see the need for this save glitch to be replicated in other scenarios, but I could be wrong. In my opinion other scenarios would best be represented if they do not use this glitch and are entertaining enough to be accepted to Moons.

Audience response was fairly mixed. There were some people that felt the TAS was boring and others that were very entertained. There was 84% support in the votes (12 yes, 3 meh, 1 no). I personally felt the TAS was a little dull but I'm not super against the movie. I could see this movie being moons but if ratings swing the other way I could easily see this being sent to Vault later on.

Accepting to Moons.

fsvgm777: Processing.

Similar submissions (by title and categories where applicable):