(Link to video)
Wait, did you just buy a bunch of cards in one shop?
-Yeah, so?
That's against the code, isn't it?
-Screw the code, I got glitches!

Objectives

  • Emulator: BizHawk 1.11.9.1
  • Core: mGBA
  • Abuses programming errors
  • Triggers the end credits

Comments

Yu-Gi-Oh! 7 Trials to Glory is a video game based on the Yu-Gi-Oh! anime series and card game. Normally the player would have to battle other duelists, enter tournaments, and more to become the new Duel Monsters champion. Normally this can take many days to do casually, but thanks to a glitch discovered by gcah2006 (a.k.a. the Master) we can have the game think it's been completed without having to play one card game.
This glitch, which will be referred to as the "shop glitch", is very simple to set up but currently has no full explanation as to why it works. To put it simply, I used lag to buy 3 of a card pack when normally I can only buy 1, and, with a combination of other packs, set the game in a post-completion state.

The glitch in more detail

Since this glitch is still new, not much is known about it. I've done quite a bit of research into this glitch and I was able to draw a few conclusions;
  • When adding cards to your basket there's a small window of frames where if you select to buy an adjacent pack in the shopping list and then cancel the order, the number you had of that previous pack will be copied over to the pack you've just canceled.
tl;dr Lag in the shop allows us to copy data.
  • You're limited to how many of each pack you can buy by your DP (Duel Points, this game's currency) and by the limit Grandpa (the shop owner) puts for each pack. Volume Packs and Standard Decks don't do anything weird if you glitch to buy more than what they were limited to, but Collection Packs do. Results caused by buying too many card packs differ depending on what you purchase (most results from what I've tested either crash or softlock the game), and it just so happens that buying the packs seen in this TAS makes the game think it's been beaten.
tl;dr Buying more cards than intended causes problems with the game's code. This is used to beat the game fast.
  • This glitch does not work with arbitrary code like many other game end runs on the site. Instead it takes advantage of poor programming with purchasing cards. Using a debugger I noticed that the game gets stuck in a loop for a while, but I couldn't gather as to what it was doing (I'm still new with assembly code). My guess is that due to the invalid amount of cards in our basket the game jumps to an unintended portion of code (which changes depending on what cards we buy). The code that the game jumps to happens to set a the flag that says the game has been beaten to true, which allows us to roll the credits whenever (this can only be done if the game has been completed).
tl;dr Too many cards equals beating the game apparently.

What's going on?

Starting the game

I set the language to Japanese to save a few frames of dialogue.
The B button is used to skip the intro to the main menu.
When starting the game, the player arrives in the Game Shop run by Yugi Moto's grand dad. He suggests that we buy some cards from him so we can start dueling.

The magic

I quickly select to buy 3 Volume 3 packs. I then use a glitch with the game's lag to select 3 Volume 4 packs and 3 Spellcaster Collection packs. Then I go to exchange the cards and that's when the magic happens.

Roll credits

I explain the glitch in more detail above, but here's a basic summary of what happened. Due to an error in the programming for purchasing cards, the game jumps to an unintended portion of code that, depending on what cards you purchase, changes a large amount of data. With this set-up, a flag that determines whether the game has been beaten or not is set to true, technically making the game completed. The game includes a feature only accessible in a post-completed state where you can play the credits at any time by inputting the Konami code (this code changes the color of the main menu as well).
(The Konami code does not trigger the credits in buildings, during dialogue, in duels, in menus, or on the title screen)
I input the code before leaving the house but after Grandpa finishes talking (the "game completed" flag was set to true before this), this is done to save frames.

Side effects

In the next section I explain some of the side effects that this glitch has in more detail, so I'll just bullet point them here;
  • The language gets set to Japanese (goes unnoticed in this run)
  • The animation speed gets set to 1 (the slowest)
  • The player gets between ~47 to 50% of all the cards in the game
  • The Player's DP becomes super low (34 with this route)
  • Despite having 0 wins/loses/draws and never entering any tournaments the game still thinks it's been beaten.
  • The day randomly changed.

Other comments

I wish I could provide a better explanation as to why this glitch happens, but sadly the glitch is still an enigma to everyone working on it. Hopefully I or anyone else will be able to find out the exact reason for this.
Some other notes;
  • About 4 seconds could have been saved if I was able to skip the BIOS (despite changing the settings it wouldn't let me skip it).
  • This is currently 3.23 seconds (RTA time) faster than the current world record.

Note to encoders

There's a scene after the credits that isn't that important. I would recommend stopping any encodes after the game fades to black from the card percentage screen.

Fog: Judging.
Fog: Game end glitches are always interesting runs to judge, as there's a lot to consider when judging runs like this. This game is of no exception. Under normal circumstances, game end glitches will trigger the credits with manipulating the game to run the credits routine. However, this run uses an easter egg to trigger the credits at any point after beating the game by entering in the Konami Code. The Konami Code is used in two places in normal play throughs of the game, to change the title screen colours between blue and purple, and to play the credits at any point after beating the game. Both uses can only be done if the game has been beaten, or in this case, thinks that the game has been beaten.
What the main glitch does in this run is set the game to think that it's in a post-completed state, thanks to some bad programming in the card shop. What this also does is unlock some extra tournaments which are only accessible after being the main game. After the movie has finished playing, you can take control over again, save the game, and reboot the game, and it will still have all of the effects of beating the game. But this run also brings up the question of what is a valid method of showing the credits or a post-completion state. We have had submissions in the past where there was no normal way of showing the credits in normal gameplay, and could only be accessed from the main menu. However, there is a known way to reach the credits in this game through normal playthrough. Seeing as this run is aiming for reaching the end of the game with a glitch, these arguments don't really apply, unless the method of achieving the glitch does not actually put the game in a post-completed state.
Because this run puts the game in a post completed state, and then plays the credits in a legitimate way (using an easter egg code only accessible after beating the game or placing it in a post-completed state), I will accept this run for Vault under the 'game-end glitch' branch.
Spikestuff: Needs more Motorcycles. Publishing.

TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 14772
Location: 127.0.0.1
Judge, Skilled player (1274)
Joined: 9/12/2016
Posts: 1645
Location: Italy
Great! Yes vote. Tough I was hoping to see a run without major skip.
my personal page - my YouTube channel - my GitHub - my Discord: thunderaxe31 <Masterjun> if you look at the "NES" in a weird angle, it actually clearly says "GBA"
Active player (397)
Joined: 3/30/2012
Posts: 401
-Screw the code, I got glitches!
I've never seen this game before, but that line of text made me want to watch this. The TAS itself is pretty cool, too. Yes vote.
Post subject: Re: #5393: AkagitsuneYuki's GBA Yu-Gi-Oh! 7 Trials to Glory: World Championship Tournament 2005 "game end glitch" in 00:35.33
Joined: 3/3/2010
Posts: 87
AkagitsuneYuki wrote:
Due to the card packs I bought, the game now thinks it's been beaten. Something that you can do if you beat the game is that you can trigger the credits at any point by using the Konami code.
This raises an alarm bell in my mind. I get that the game needs to be in a certain condition for the credits to unlock with this code, but I think it would be more impressive if you could trigger the credits without using one of the most well known cheat codes in gaming history. It almost feels like a game where there's an option to run the credits from the main menu when it's done using a cheat code like this. (Holding off voting for now)
Joined: 5/23/2014
Posts: 162
Are the credits possible to trigger via the code regardless of game progress, or is achieving a "game beaten" state a requirement to view the credits? If it's the former than I have serious doubts about this being a legitimate completion; the latter I question the same for different reasons. If triggering the credits happens at any time then what exactly *proves* the game state given is a legitimate "game beaten" state? I don't know the game, so I don't know the answer. Alternatively, if using the code only works after achieving a "game beaten" state, is this a *legitimate* game beaten state, or merely one that is able to show the credits? Yes, there is a difference, as has been proven in the past with Pokemon runs on the site. TL;DR I have issues with the "ending" and there's not enough detail in the submission text to answer my questions.
Joined: 5/15/2013
Posts: 21
This glitch does unlock other postgame features. A new area called the Mystic Land becomes accessible (which, as I understand, you can only get to after beating the game). If you reset after doing the glitch, the background in the title screen is purple (which you can only get by beating the game) and you can toggle it between blue and purple with the Konami code. I don't know much more, myself, as I've only done a little bit of my own work with this glitch after seeing gcah monkey around with it. Try buying 27 of everything at the start. Then prepare to say goodbye to your SRAM.
I have the tendency to post a few too many Kappas.
Player (12)
Joined: 6/17/2006
Posts: 498
I usually enjoy "game end glitch" runs, but this particular one didn't feel special to me. The game just lagged for a few seconds, then things seemed to go back to normal, then credits. Because of this, I voted Meh. I think the reason is the Konami code use, a fact that I did not realize before voting, as its unlock was done in an unintended manner, but its use was in an intended manner. Regardless, this is an interesting gray zone in the rules. I believe the closest precedent was the Golden Torizo code in Super Metroid, since both are cheat codes that cannot be normally triggered under normal circumstances.
Skilled player (1703)
Joined: 9/17/2009
Posts: 4952
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
SmashManiac wrote:
I usually enjoy "game end glitch" runs, but this particular one didn't feel special to me. The game just lagged for a few seconds, then things seemed to go back to normal, then credits. Because of this, I voted Meh. I think the reason is the Konami code use, a fact that I did not realize before voting, as its unlock was done in an unintended manner, but its use was in an intended manner. Regardless, this is an interesting gray zone in the rules. I believe the closest precedent was the Golden Torizo code in Super Metroid, since both are cheat codes that cannot be normally triggered under normal circumstances.
Well, I know if it's a password glitch it mostly isn't vaultable. I have no clue for the Konami code, given that doing so before the game cleared flag is set won't trigger credits (if I understand the submission notes correctly).
Joined: 8/5/2015
Posts: 3
Habreno wrote:
Are the credits possible to trigger via the code regardless of game progress, or is achieving a "game beaten" state a requirement to view the credits? If it's the former than I have serious doubts about this being a legitimate completion; the latter I question the same for different reasons. If triggering the credits happens at any time then what exactly *proves* the game state given is a legitimate "game beaten" state? I don't know the game, so I don't know the answer. Alternatively, if using the code only works after achieving a "game beaten" state, is this a *legitimate* game beaten state, or merely one that is able to show the credits? Yes, there is a difference, as has been proven in the past with Pokemon runs on the site. TL;DR I have issues with the "ending" and there's not enough detail in the submission text to answer my questions.
Triggering the credits with the Konami code is only possible after the game is completed. The glitch with this set-up puts the game in a post completion state, some signs of this that weren't shown in the TAS include unlocking a new area and the title screen turning a reddish-purple color. So yes, the game has been technically beaten. I'll make sure to explain it better in the submission text.
Do not read this signature
Active player (405)
Joined: 2/5/2012
Posts: 1676
Location: Brasil
with this explanation,its a yes vote from me! great work!
TAS i'm interested: megaman series: mmbn1 all chips, mmx3 any% psx glitched fighting games with speed goals in general
Editor, Player (44)
Joined: 7/11/2010
Posts: 1022
This brings up interesting conceptual problems as to what it means to beat a game. First off, I feel that entering the code to show the credits is just wasting time; entering a cheat code can't contribute to beating a game, so either the game is beaten without the code, or it isn't beaten even with the code. So the question boils down to "does setting a 'the game is beaten' flag count as beating the game?". I suspect that entering a postgame area with a glitch wouldn't count as beating the game, but I'm not sure this is the same (and we've treated the fact that the game enters a postgame state as evidence that the game is beaten before now). I'm currently leaning towards considering this invalid, but I'm certainly willing to have my mind changed, as I'm far from certain.
Joined: 8/5/2015
Posts: 3
ais523 wrote:
This brings up interesting conceptual problems as to what it means to beat a game. First off, I feel that entering the code to show the credits is just wasting time; entering a cheat code can't contribute to beating a game, so either the game is beaten without the code, or it isn't beaten even with the code. So the question boils down to "does setting a 'the game is beaten' flag count as beating the game?". I suspect that entering a postgame area with a glitch wouldn't count as beating the game, but I'm not sure this is the same (and we've treated the fact that the game enters a postgame state as evidence that the game is beaten before now). I'm currently leaning towards considering this invalid, but I'm certainly willing to have my mind changed, as I'm far from certain.
The Konami code in this game isn't really a cheat as it is more of an easter egg. I felt that using the code to trigger the credits (which can only be done if the "game beaten" flag is true) was the best evidence to show the game was completed as the only other evidence would be to enter a tournament that's only accessible after the main game or to reset and show the changes to the title screen. If I just ended the TAS outside of the game shop it would look like nothing had changed aside from some animations being slower.
Do not read this signature
Joined: 3/3/2010
Posts: 87
I think the most common expectation when someone sees the category "Game End Glitch" is that the glitch itself triggers the credits/ending sequence/whatever. While this does set the game into a post-completion state, it doesn't directly take you to the credits, which is what I (among others) have a problem with. That being said, I understand your dilemma in deciding how to show that the game is in a "finished" state. I'm just not sure there is a good answer to this particular situation. If another glitch could be found that did trigger the credits directly (buying a different sequence of packs, maybe?) then we wouldn't even be having this discussion.
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
Yknow what about if the language isn't changed to Japanese at the start? Changing the language text to save non-gameplay time is sometimes an iffy proposition for publishing, for one. But if the language changes to Japanese after the glitch takes effect, then it becomes even more clear that things are weird and glitched out.
Editor
Joined: 11/3/2013
Posts: 506
The thing is that this TAS just doesn't appear all that superhuman. It doesn't look as though TAS tools confer that much of an advantage for a run this short and this menu-based. Not a criticism of the run, it's just the nature of the game. By the way, what is this TAS's timing with RTA rules?
Editor, Player (44)
Joined: 7/11/2010
Posts: 1022
Akagitsune Yukimura wrote:
The Konami code in this game isn't really a cheat as it is more of an easter egg. I felt that using the code to trigger the credits (which can only be done if the "game beaten" flag is true) was the best evidence to show the game was completed as the only other evidence would be to enter a tournament that's only accessible after the main game or to reset and show the changes to the title screen. If I just ended the TAS outside of the game shop it would look like nothing had changed aside from some animations being slower.
I agree in that I don't think using the code invalidates the run, and it's a good way to show to the viewers that the game-complete flag is set. As such, I consider it a speed-entertainment tradeoff; if the run is valid, it's not going to the credits that makes it valid.
Joined: 8/7/2011
Posts: 166
I agree losing frames to show the language changing would be preferable. How long would it take to get to the post-game area?
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 14772
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [3335] GBA Yu-Gi-Oh! 7 Trials to Glory: World Championship Tournament 2005 "game end glitch" by Akagitsune Yukimura in 00:35.33