Why MissingNo Multiplies Items!

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • In this part two we investigate how encountering a glitch pokemon will cause the 6th item to multiply. For this we are using Ghidra and SameBoy to debug and reverse engineer the code.
    Part 1: • Researching MissingNo ...
    Want to understand how to catch Mew? • Exploring the Mew Glitch
    Checkout the whole GameBoy hacking playlist with stacksmashing: • Game Boy Hacking
    PwnAdventure Game Hacking Series: • Pwn Adventure 3: Pwnie...
    GhidraBoy: github.com/Gek...
    SameBoy: github.com/LIJ...
    =[ 🔴 Stuff I use ]=
    → Microphone:* geni.us/ntg3b
    → Graphics tablet:* geni.us/wacom-...
    → Camera#1 for streaming:* geni.us/sony-c...
    → Lens for streaming:* geni.us/sony-l...
    → Connect Camera#1 to PC:* geni.us/cam-link
    → Keyboard:* geni.us/mech-k...
    → Old Microphone:* geni.us/mic-at...
    US Store Front:* www.amazon.com...
    =[ ❤️ Support ]=
    → per Video: / liveoverflow
    → per Month: / @liveoverflow
    =[ 🐕 Social ]=
    → Twitter: / liveoverflow
    → Website: liveoverflow.com/
    → Subreddit: / liveoverflow
    → Facebook: / liveoverflow
    =[ 📄 P.S. ]=
    All links with "*" are affiliate links.
    LiveOverflow / Security Flag GmbH is part of the Amazon Affiliate Partner Programm.

Комментарии • 523

  • @NancysSpankBank
    @NancysSpankBank 4 года назад +575

    The fact, that we're in 2020 and people are still talking about Missingno makes me very happy

    • @MysticIceFire
      @MysticIceFire 4 года назад +5

      Missingno best pokemon,,,

    • @RedstoneHair
      @RedstoneHair 4 года назад +1

      Yeet, I'm playing on lakka pokemon red to get missingno, I got fly and all, I need surf and the island and I will get missingno

    • @ieanenizedsalt3311
      @ieanenizedsalt3311 4 года назад

      Quarantine my boi. Quarantine

    • @wayge
      @wayge 3 года назад +4

      Not only are we still talking about it, were still learning things about it

    • @UNDEADWXRLORD
      @UNDEADWXRLORD 3 года назад +1

      2021

  • @StanleyDarsh22
    @StanleyDarsh22 4 года назад +392

    this is beautiful. not only are you clever for coming to the conclusion you did, but very intelligent for your ability to communicate the behavior of the bug to an audience that knows way less about it than you do.

    • @TypicalSardine
      @TypicalSardine 3 года назад +6

      Literally this looked like magic to me, I hardly understood a thing but I still feel enlightened 😂

    • @Egan466
      @Egan466 3 года назад +4

      that's the reason I love his channel.

  • @ReturnRei
    @ReturnRei 4 года назад +87

    I like the "how you could've found it yourself" approach as it teaches beginners how to get started in reverse engineering / research! Great Video!

  • @supportic
    @supportic 4 года назад +267

    Every video is like watching a detective series.

    • @kebien6020
      @kebien6020 4 года назад +1

      This. I think it's on purpose, and he makes it work sooo well.

    • @RedstoneHair
      @RedstoneHair 4 года назад

      Ya

  • @fouzaialaa7962
    @fouzaialaa7962 4 года назад +87

    as my grandpa always said :always check for array out of bound

    • @aytchemil
      @aytchemil 4 года назад +2

      oh gramps

    • @RussellTeapot
      @RussellTeapot 3 года назад +2

      so.. this is basically a buffer overflow?

    • @fouzaialaa7962
      @fouzaialaa7962 3 года назад +3

      @@RussellTeapot yes but the conditions was not catched by anything !!! usually it will be stopped at runtime and caught there but a buffer overflow is wen it doesn't get caught by anything and it roams the memory freely

  • @fghsgh
    @fghsgh 4 года назад +68

    As a fluent Z80 programmer, I could follow along perfectly with the disassembly, but you still gave some insights I could not have gotten, thank you very much. This was definitely worth the 20 minute watch.

  • @OpenKeith
    @OpenKeith 4 года назад +159

    I remember hearing that the reason those right-side tiles spawn land pokemon is because the game only uses the bottom-left 8x8 graphics tile for the "is this water?" check

    • @Double-Negative
      @Double-Negative 4 года назад +61

      This is exactly correct and explains two other things:
      1. There are patches of grass in veridian forest which speedrunners use all the time because no pokemon spawn there. This is because certain grass tiles have a different sprite in the bottom left for cosmetic reasons, but it is not read as a grass tile, so no pokemon spawn.
      2. In some internationalized versions of the game, both checks are done on the same tile, so the missingno glitch is impossible in those versions.

    • @ElectTheMusic
      @ElectTheMusic 4 года назад +13

      @@Double-Negative you can get missingno in every version of the game, it's just a different process.

    • @proxy1035
      @proxy1035 4 года назад

      that is exactly why ruclips.net/video/8PILbqZqaS4/видео.html

  • @lostmyplaintext7587
    @lostmyplaintext7587 4 года назад +84

    Don't know if you plan on continuing this series but the "beat the game in 3 minutes" glitch is also pretty interesting from a technical standpoint :-)

    • @Keldor314
      @Keldor314 4 года назад +4

      You have to wonder about the speedrun community sometimes when they allow something that's quite literally hacking the game to get to the end to count as a valid run e.e

    • @SilphBoss
      @SilphBoss 4 года назад +20

      @@Keldor314 because it can be done without modification to the physical game... can be done by hand by only playing the game

    • @Aleuay
      @Aleuay 4 года назад +8

      @@Keldor314 overflowing the inventory through ACE or save corruption is within the bounds of the game, which is allowed. It takes a ton of skill and precision (navigating the inventory when it's overflowed requires you press A+B to scroll, it's extremely tight)

    • @OatmealTheCrazy
      @OatmealTheCrazy 3 года назад +2

      @@Keldor314 it almost doesn't really. There's no point trying to beat a time of 00:00, so it's not really run

  • @Modslover
    @Modslover 4 года назад +209

    You're a very smart guy and very informative and great personality, i enjoy your videos.

    • @nikigameplay
      @nikigameplay 4 года назад +3

      that's why I really enjoy his vids! :D

    • @RedstoneHair
      @RedstoneHair 4 года назад

      Same

    • @aaggroberlin19
      @aaggroberlin19 3 года назад

      Why the hell is he smart because he has experience in something? According to you everyone is smart who knows this stuff o.O. And why does he have "great personality" because of his knowledge? Your comment makes 0 sense.

    • @Modslover
      @Modslover 3 года назад

      @@aaggroberlin19 wow you went through 11 months of comments to get offended at someone random complementing another random person. I'm sorry that people can't have an interesting and fun way of providing content resulting in a good personality as well as being having the ability to hone his skills and knowledge on technology to be able to describe in detail to everyone that doesn't know how or why something is happening. I am really glad you are here to show us that you are probably the smartest man alive. Knowing everything possible that the world has to offer before even hearing about it because you're so smart. I apologize for hurting your feelings for me supporting another pea brained human like myself. We praise you all mighty watermelon brain. Show us the way, inform us with your superior brain power and knowledge. P.s. get a life and stop trying to take other people down with you, humble yourself and maybe you can provide the world some small amount of hope and further help the world more towards a better future.

    • @aaggroberlin19
      @aaggroberlin19 3 года назад

      @@Modslover 🤨

  • @DaenaMichelle
    @DaenaMichelle 4 года назад +7

    As a pokemon fan and a software developer I must say you are an absolute madman and so admirable for exactly that, thanks for doing this!

  • @some1fromthedark
    @some1fromthedark 4 года назад +227

    I believe you were unable to rename variables because even though you disassembled the data, it was set as an undefined function. If you selected the address of the start of the function in ghidra and press f, that will define the function. After that you should be able to rename the function, variables, etc.

    • @GrandpaGameHacker
      @GrandpaGameHacker 4 года назад +8

      this is correct!

    • @gcm4312
      @gcm4312 4 года назад +7

      yes. the grayed out box in the decompiler view means that a function was not defined.

  • @1337GameDev
    @1337GameDev 4 года назад +2

    I REALLY like that you show that you're not super knowledgeable about everything, and your process in figuring it out. Very fun to watch/listen.

  • @ValseInstrumentalist
    @ValseInstrumentalist 4 года назад +5

    Totally agree with your points about seemingly "pointless" research. I first used Cheat Engine by following a tutorial for how to use it with the game Dink Smallwood. That made me feel like a badass programmer, so I continued on to learn all kinds of other tech stuff like Python, Arduino, Raspberry Pi, and more.

  • @Ziberac
    @Ziberac 4 года назад +13

    This made me think back to the first game I had made in C++ that had this exact problem and made the game do crazy stuff. Very cool to watch.

  • @NorthLaker
    @NorthLaker 4 года назад +4

    Hearing you being satisfied with your findings makes me satisfied as well!

  • @123gostly
    @123gostly 4 года назад +8

    Used to use this hack all the time as a kid but with this video all of it is so beautiful. If only one thing had not gone wrong it would have never happened. Seems magical.

    • @Chaos89P
      @Chaos89P 4 года назад

      Let me paraphrase to you what one Vinesauce guy's dad once said to him: It IS magic.

  • @over00lordunknown12
    @over00lordunknown12 4 года назад +1

    You are the first person I’ve seen actually go into the code to explain the MissingNo glitch. I hadn’t even thought about why it duplicates items, I just knew it did. Keep up the good work!

  • @Originalimoc
    @Originalimoc 4 года назад +7

    There're so many glitches related to the workaround of hardware limitations back then, there's rarely such kind of bug now.

  • @djbvck
    @djbvck 3 года назад +2

    I love how in depth you went into the reasons the glitch effects everything. A lot of people just say "it changes these values when you talk to the old man" and didnt go into the things you can do with for instance the safari zone. I wish I knew about that years ago, would have made getting a Dratini waaaaay easier lol

  • @d0gkiller87
    @d0gkiller87 4 года назад +6

    7:58 The debuggers on Windows work the same way.
    Set a hardware breakpoint on memory access/write, causes the target be paused AFTER the access/write instruction did something to that memory
    (no IP register can be traced, so the debugger cannot determine what instruction is gonna do something to what memory without dynamic analysis).

  • @Frick-bv6xt
    @Frick-bv6xt 4 года назад +133

    I have absolutely no idea whats going on but it makes sense to me idk.

    • @charalampospapaioannou2371
      @charalampospapaioannou2371 4 года назад +8

      Exactly! Cant understand a single thing he just said but I love all of it

    • @RubyPiec
      @RubyPiec 4 года назад +5

      @@charalampospapaioannou2371 I do
      not understand it either but I still enjoy this. :)

    • @jpobi9880
      @jpobi9880 4 года назад +6

      This Is how I feel watching NileRed (chemistry) as a programmer.

    • @rndargis0
      @rndargis0 4 года назад +1

      The first thing I think of when I see H & L register and then a HL load instruction is that H is the high part of the address register and L is the low part of the register for the jump

    • @randomnerd4600
      @randomnerd4600 4 года назад

      Ecountered pokemon are based on pokemons pokedex id. And missingno points to sone crap that mods items... Thats what i think. I mean, i know abt dat from other vids.

  • @laurinneff4304
    @laurinneff4304 4 года назад +1

    I like how everyone is doing game boy/Pokemon/missingno videos rn, you, stacksmashing and retro game mechanics explained

  • @James2210
    @James2210 4 года назад +7

    Just going to post a few more details here, don't mind me:
    JR LAB_rom3__76a0 is an unconditional relative jump.
    ADD L doesn't modify L. It adds L to A. The LD L, A does modify L, though.
    Yes, SRL is a logical shift right.

  • @Innosos
    @Innosos 4 года назад +5

    Some people are gonna eat this up. I'm reminded why I hate assembly.
    Great video and good job explaining it. It's a bit hard to follow at times because I'm not up to snuff with pointers, memory, addresses and their concepts.
    Always good to see people with a lots of patience and competence.

  • @BatteryAcid1103
    @BatteryAcid1103 4 года назад +1

    I wish I could thumbs up this video multiple times. That little rant about playful research is really important for people to understand! If you're learning something, it's not a waste of time!

    • @AT-zr9tv
      @AT-zr9tv 4 года назад

      Totally agree!

  • @PicMus
    @PicMus 3 года назад

    Loved the narrative and editing. Great skills of storytelling =)

  • @over00lordunknown12
    @over00lordunknown12 3 года назад

    I don’t really know much with assembly (much less disassembling code), but you did a fantastic job explaining it, and the end conclusion makes sense.

  • @GrandpaGameHacker
    @GrandpaGameHacker 4 года назад +1

    This is awesome work. Using a scientific approach to game hacking, you figured out exactly why a bug occurs.
    I didnt know about the memory bank system, thats very cool.
    Also high five to Ghidra for making hobbyist's lives easier

  • @GodKido
    @GodKido Год назад

    I'm tore between "this is awesome" and "how could you ever let this release unnoticed", but it's still a 25+ years old game so maybe not that odd... thanks for the insight, this was really interesting!

  • @traaafik
    @traaafik 4 года назад +4

    Wow, I got nerd chills when listen to this great explaintion! Thank you!

  • @VampireJester
    @VampireJester 4 года назад +1

    I have no knowledge of coding but I feel like I understood everything you said in both videos. I have no idea why but you just made so much sense.

  • @WilliamTresnon
    @WilliamTresnon 4 года назад

    I love that both of you are doing this together. Collabs like this of this nature around similar subject need to happen more because the amount of content coming out of you two is great.

  • @MrJerohm
    @MrJerohm 4 года назад +1

    I'm impressed by the details you time and time you must have spent working on this video, thanks a lot for sharing it !

  • @webentwicklungmitrobinspan6935
    @webentwicklungmitrobinspan6935 4 года назад

    Its so cool that you are able to analyse these old games by looking at their memory allocation.. must have been a cool time as a gamedev back then

  • @m4gmu5hell
    @m4gmu5hell 4 года назад +7

    I just started learning 6502 assembly like a week ago and am amazed, on how much I could follow with the code xD

    • @Chaos89P
      @Chaos89P 4 года назад +1

      6502 and z80, especially a modified one to include 8088 instructions, are different chips, but ASM tends to be similar in appearance.

    • @KidPrarchord95
      @KidPrarchord95 4 года назад

      I've been fearing and neglecting starting for years and I am also amazed at how well I could follow

  • @BGroothedde
    @BGroothedde 4 года назад +1

    That's a beautiful bug, it's so involved and has so many steps; that's what old school programming was all about!

  • @Demonslay335
    @Demonslay335 4 года назад +3

    @3:30 OMG I literally had to pause the video, I was laughing so hard. Can totally relate to that moment on so many levels - both in game and in debugging. 😆

  • @AnthonyHarrisTechrat
    @AnthonyHarrisTechrat 4 года назад

    You and StackSmashing breaking all this down is some of the most enjoyable content I've seen in a long time. Great analysis, thanks for making these!

  • @revenevan11
    @revenevan11 4 года назад

    Absolutely fantastic video. So satisfying to be able to follow along with the *why* this historic bug does what it does. You've been slowly kindling my interest in picking apart software to learn about it. I loved picking apart electronics and some mechanical devices to learn how things work or some tricks I could use even if I didn't understand the whole device or what specific or odd components did. Now as my journey into learning to code is continuing, instead of having to pressure myself into committing far enough into a big project or building some arduino gizmo in order to actually get some coding practice in (now that I don't have any coding assignments and am strictly self teaching and using online tutorials), I can now get some practice and learn something by just casually fooling around! Even with games!

  • @beeperonithe2nd
    @beeperonithe2nd 2 года назад

    I really love videos like these even if I can barely understand them sometimes. But you do the best job at explaining without over-complicating things...
    Also Gen 1's spaghetti code is amazing to dissect lol.

  • @vladimir520
    @vladimir520 4 года назад

    This is such an interesting approach! Although I am not much experienced with assembly (I have simply played with the basics in a CTF), this step-by-step process really helped show me both how to investigate glitches and understand what you were saying! Should the big reveal just have been given to me, I probably couldn't make out much of it!
    Really fun series, I have thoroughly enjoyed these past videos of yours! Keep doing this amazing stuff, LO!

  • @savagetheunicorn4555
    @savagetheunicorn4555 4 года назад +5

    Awesome i was waiting for this video when i found the previous yesterday c:

  • @SergioEduP
    @SergioEduP 4 года назад +3

    Loved this (and the previous) videos! Would love to see a similar one explaining the Super Mario Bros credits warp used in speedruns =P

  • @ScrombIo
    @ScrombIo 4 года назад +2

    IIRC the game will place the ending "1" into the item slot, essentially adding 128 items to item stacks that do not have 128+ items in them already. The glitch will not work on any item stack that is greater than 128, and using it on an item with a stack of 127 makes that item into a stack of 255. 255 also has the same properties as the CANCEL button which lead to some of the old Pokemon Blue any% NSC routes before easy ace with maps was discovered.

  • @Neoplasie1900
    @Neoplasie1900 4 года назад

    Oh boy. So far, my personal coding was some data organisation with Python and converting a few hundred text files into an Excel sheet. Still you made me (kind of) understand what was going on here. Pretty cool stuff! And pretty fascinating reverse engineering work.

  • @HighPriestFuneral
    @HighPriestFuneral 4 года назад

    Having done some SNES, N64, and PS2 ASM hacking in the past, this was an absolute joy. I audibly said... "Oh...!!" When you put together the pieces at the end. All of this time it was a simple out of bounds array, with the idea that they never intended to have 32 bytes for all possibilities of Pokemon. This was a fun mystery that you broke down. Hopefully it inspires others to follow your lead.

  • @sagacious03
    @sagacious03 4 года назад +2

    Pretty interesting! I wonder if you'll "tackle" some of the less well-known Glitch Pokemon! Nonetheless, thanks for uploading!

  • @Squolly
    @Squolly 3 года назад

    Awesome video. Enjoyed this and the corresponding MissingNo Video very much. Your explanation is very detailed and comprehensive and you really cheer one up to try to do similar research on other bugs or just simple game logic in old games. As someone who once wrote a gameboy emulator for learning purposes I can only recommend your videos for everyone who wants to become more emerged with this awesome piece of hardware.

  • @joemck85
    @joemck85 3 года назад

    Clever analysis. I'd just assumed it was decoding the garbage sprite and cry data that resulted in the 6th item quantity being corrupted.

  • @nielsbishere
    @nielsbishere 4 года назад

    So just to add to this; arithmetic functions generally use the accumulation register (a) so that's why that add doesn't have , a there. Also, HL spans two registers; H and L, the gameboy has mainly 8-bit registers but also shares those to make 16-bit registers so it can do stuff with addresses.

  • @basedfacistman
    @basedfacistman 4 года назад +4

    im genuinely happy when i see live's new video

  • @prestonduffield5393
    @prestonduffield5393 4 года назад

    It’s crazy I’m working on a project right now in school where we have to reconstruct a program from assembly. Very relevant and applicable stuff. Good work on finding out this bug and satisfying all of the people who wanted to know the reason behind all this madness’

  • @wildbill268
    @wildbill268 2 года назад

    This is so cool to see in action! If you didn't know, it's actually possible to duplicate TWO sets of items by replacing the already duped item with another item that has yet to have it's bit flipped during battle. When you catch missingno, that same function must be performed in the process of updating it's Pokedex entry, but instead of listing it as "seen", it gets listed as "caught". The game then forgets that you even saw missingno since the data for that would normally be referenced in the Pokedex data, which explains why this can be repeated multiple times through various wild encounters with missingno.
    That's probably not 100% correct, but that's my educated guess :)

  • @Litronom
    @Litronom 4 года назад

    The conclusion at the end is very satisfying and pleasing! Great video!

  • @AT-zr9tv
    @AT-zr9tv 4 года назад

    Awesome video!! I'm so happy the time I've been spending these past two months learning about Gameboy assembly has enabled me to understand much of this video. I would have been completely lost otherwise. Really great video, thanks!!

  • @razerx9393
    @razerx9393 4 года назад +2

    Just on a side note: Pokémon red/ blue had Pokémon from gen 2 (gold/ silver) in the Code but they were never really put in. No sprites etc. There is a list online that shows you every Pokémon that’s in the code and where it’s placed. Early on in the video, you said that you hit the value 135. That’s probably the actual Pokédex number (or shifted by one because of starting from zero) but it is a Pokémon that never made it into the game, so showing a missing no. I’m not a nerd in this coding stuff but I’m a nerd for Pokémon :D ps: most of these gen 2 Pokémon are above the index of 100 for some reason

    • @ArloMathis
      @ArloMathis 4 года назад

      The internal IDs are the order Pokemon were added to the game. Scrapped Pokemon IDs were blanked out with a OO, or missing number. Pokemon scrapped from Gen 1 were recycled for Gen 2, leading to them being in the data.

  • @seriousskateboarding9938
    @seriousskateboarding9938 3 года назад

    I personally found a bug along time ago to give your pokemen unlimited hp. It could be used to further this research, if you're interested. And this bug has possibly never been released, until now. As I'm the one whobpersonally discovered this bug by pure accident back in grade 6. Though I'm not sure, this bug is probably already, but here it is; I can't remember exactly how to do it because it was like 2 decades ago, but I think the trick was a Lil sumthin like this. 1. You need to start by doing this same missing no glitch (as most of us know each save file gets its own randomly selected pokemen that can be a lvl that is over 100.) 2. Catch the bugged lvl pokemen. 3. Lvl the bugged pokemen to max lvl. (THIS IS WHERE EVERYONE THOUGHT THE GLITCHES STOPPED) 4. (this next part is the part I accidentally discovered) After steps 1-3 are done: trade the pokemen to a different game via the ol link cable, then trade it back. The pokemon will lose lots of lvls after the trades, but the hp will remain as if it didn't unlvl. 5. Lvl the pokemon back to max lvl then repeat step 4... Everytime you lvl then do the trade and trade back it allows you to infinitly?? Keep increasing the hp everytime steps 4+5 are repeated. I never knew this random bug I found 20 years ago could possibly be useful for awesome research like this my dude..

  • @hasancakir8932
    @hasancakir8932 4 года назад

    Summary at the end explains the missingno bug well. Great video!

  • @SincerelyVince
    @SincerelyVince 4 года назад +3

    I'm a Java code architect. Recently, I've been working with systems that involve working with files containing raw data. This series has inspired me to jump into the ROM modding community. Keep up the excellent work 👍 Have any recommendations for those interested in studying assembly?

  • @standarrow9759
    @standarrow9759 4 года назад

    I just discovered your channel even though i dont understand anything i still enjoy it

  • @carlisleee_
    @carlisleee_ 4 года назад +1

    This video makes me really want to learn assembly... Thank you for that

  • @SiIverDragon
    @SiIverDragon 3 года назад

    I understand the concept of it , but I don't understand all this programming stuff , but still I love that kind of videos Thank you :)

  • @sywei-vn2te
    @sywei-vn2te 4 года назад

    You can configure your assembly listing window to show Ghidra's IR by clicking on that window's configuration, choosing PCode ops, and "enable field". The breakdown can help you figure out what the labeled mnemonics mean without resorting to a manual.
    You can also right-click on the mnemonic and jump to the instruction specification in the processor manual included with Ghidra.

  • @masternerd64
    @masternerd64 4 года назад

    man I'm actually really glad for my computer organization and architecture class now. I actually understand what's going on for the most part

  • @tartas1995
    @tartas1995 4 года назад

    Because of this serie, I started looking at the Pokemon disassembly from Pokemon red (pokered on github) and I started to learn assembly for the GB. Gbz80 assembly.

  • @Levi_OP
    @Levi_OP 4 года назад +11

    “The seventy tooth bit”

    • @ArloMathis
      @ArloMathis 4 года назад +1

      You have to admit our system is kinda bad, it should be standardized.

    • @animowany111
      @animowany111 4 года назад

      It is, and ordinal 72 is called seventy-second.
      English is actually one of the simpler languages when it comes to ordinals, and number kinds in general. 1st, 2nd, 3rd, 4-20th, 21st, 22nd, 23rd, 24-30th, ...

    • @RussellTeapot
      @RussellTeapot 3 года назад

      @@animowany111 The seventy secondth bit

  • @Wkterr
    @Wkterr 4 года назад +2

    For anybody else who has the source code for Pokémon gen 1 and are following along: You can find the code shown at 11:18 in Tools.dmg at around line 3925. It's in the "bit_control" routine.

    • @Wkterr
      @Wkterr 4 года назад +2

      The code at 13:58 seems to be in FIGHT.DMG, around line 8629.

    • @Wkterr
      @Wkterr 4 года назад +1

      Comment on 20:14: Yes, this is correct. If you look at the call instruction right before the call to the "setNthBit" routine (called "bit_control" internally), it's calling the routine that fetches Pokémon IDs. Again, if you have the source, you can find this routine (get_order_no) in ZUKAN.DMG (zukan = "picture book", or Pokédex, as it as later named) at around line 1220. It fetches the Pokémon ID from the table in monsdata/order.dat. Here, missingno's ID is 0x00, and as you said, all IDs found in the order table are decremented before they're used.

  • @Dpx008Music
    @Dpx008Music 4 года назад

    I think you should check out Zelda Ocarina of Time related glitches, there are a ton of really interesting glitches like inventory manipulation or abusing cutscene pointers to warp to unintended locations.
    Even a few months ago, they discovered how to execute arbitrary code and functions in the game to basically do anything they like.
    I think it'd be really amazing if you took a look at this game!

  • @jambosuss
    @jambosuss 3 года назад

    You explain this very well, you lost me in parts, but I sort of understand what's going on. I lasted until around 18:00 before I couldn't follow anymore. GG

  • @tr1bute411
    @tr1bute411 2 года назад

    This was great! I know it's a while ago you did this, but I would LOVE more research-perspective game bug investigations. Perhaps you could consider doing something similar with the Ocarina of Time Wrong Warp bug? It's also pretty crazy.

  • @XeZrunner
    @XeZrunner 4 года назад

    Stunned! You made this so interesting!
    Thank you for your amazing work! I'm having lots of fun watching these videos!

  • @LordMarlle
    @LordMarlle 4 месяца назад

    The old man glitch was incredibly strange and interesting to me as a child. I knew about game genie and understood that it changed the data of the game, so that wasn't mysterious or strange at all, it only got a bit fascinating when random codes sometimes would do unexpected things to the game. But talking to the old man, rewatching his tutorial, flying to some arbitrary yet specific locale, and then surfing, but only on the ledge, and then weird encounters would start, and somehow a single item slot would get multiplied? That was so frikkin weird. I'm not an expert of processors or programming at all, but I have a certain interest and I think it stems from that very glitch

  • @dervolker
    @dervolker 4 года назад +4

    As always great analysis, couldn't agree more with you, that time spent fiddling around with something is worth it, since you learn so many things on your way, that otherwise only seem like abstract ideas.
    Nothing explains raceconditions better than injecting code into some process and having it crash hard ...sometimes...
    Keep it up

  • @danieliusz7228
    @danieliusz7228 4 года назад +2

    Nice luck I'm having. This got uploaded when I finished watching part 1!

  • @letsrobocraft7282
    @letsrobocraft7282 4 года назад +4

    Hey, at 01:16 there's on the screen that 0xff = 256, but 0xff = 255, just wanted to point that out :)

  • @strattissimo8223
    @strattissimo8223 4 года назад

    Great video! I have always wondered why it was the 6th item when I found missingNo. Thanks guys!!

  • @evanjacoby7805
    @evanjacoby7805 4 года назад

    I was trying to find a good answer to this the other day! thanks for the upload

  • @sundhaug92
    @sundhaug92 4 года назад

    The Game Boy (and Game Boy Color) uses an instruction-set that is mostly like the 8080 and z80. This family uses 8-bit registers (except PC and SP, which are 16-bit), but for some instructions you can use 16-bit pairs (AF, HL, ...)

  • @Matt23488
    @Matt23488 4 года назад

    It's such an elegant bug... Thanks for this extremely enjoyable explanation!

  • @happinson
    @happinson 4 года назад +8

    did he mention that he has never seen this assembly

  • @Letalight
    @Letalight 4 года назад

    I like that after all of this desassembly you make me feel like a nerd knowing that arrays start at 0.

  • @Matthew_and_Ami
    @Matthew_and_Ami 4 года назад +1

    So one thing i remember, is if you got to the east side of seafoam islands coming from fuchsia city it does the same thing. While it does take longer to reach. It does work as well

    • @Chaos89P
      @Chaos89P 4 года назад

      I went down the right shore of the route south of Pallet Town and found a Raticate.

  • @spicybaguette7706
    @spicybaguette7706 4 года назад +3

    It's always the array out of bounds that gets ya

  • @arnevaneycken2878
    @arnevaneycken2878 Год назад

    This is amazing. Hits right in the childhood

  • @Manawyrm
    @Manawyrm 4 года назад

    If you also want to read the assembly for the mentioned functions (in a commented and somewhat structured form), here are some links to PokeRed:
    LoadEnemyMonData: (handles the pokemon encounter, calls the Flag function below)
    github.com/pret/pokered/blob/606df6a317df7c8d076410e8189f7e0a7782b530/engine/battle/core.asm#L6200
    here's the code that handles the IndexToPokedex-conversion and set's the flag:
    github.com/pret/pokered/blob/606df6a317df7c8d076410e8189f7e0a7782b530/engine/battle/core.asm#L6337
    IndexToPokedex:
    github.com/pret/pokered/blob/606df6a317df7c8d076410e8189f7e0a7782b530/engine/menu/pokedex.asm#L649
    Flagging-Function (also takes in a 3rd input value, the B register, which contains clear, set or read)
    github.com/pret/pokered/blob/606df6a317df7c8d076410e8189f7e0a7782b530/engine/flag_action.asm#L1
    predef seems to be the bank-switching function, which is structured as a macro (?) in Pokered:
    github.com/pret/pokered/blob/6ba3765c5932996f5da6417ae703794ff10bb1cb/home/predef.asm
    Thanks for these two great videos! I had a lot of fun watching and now reading the assembly.

  • @fliptech
    @fliptech 4 года назад +10

    Hey, would you like to do a follow up, that shows why the Save data gets corupted, when catching a missingno and saving the game.

    • @willofthewind
      @willofthewind 4 года назад +1

      But doesn't only the hall of fame get corrupted for MissingNo.?

    • @Mabi19
      @Mabi19 3 года назад +1

      Well, for now I can explain why the save data gets corrupted - but not as detailed as this video.
      Basically, have you noticed that Missingno's sprite is not a square? This is because it has invalid dimensions.
      When decompressing the sprite, the game expects that the sprite be a maximum of 7x7 tiles - but Missingno is larger. (11xsomething I believe.) This causes it to do a similar out-of-bounds array access which attempts to decompress the Hall of Fame data. But that is not compressed, so you just get gibberish.
      Edit: There's also a glitch Pokemon called "4 4" that has a sprite so large it decompresses into the RAM so far that it corrupts the sound system, which corrupts even more things. The game barely survives at that point (in fact, it usually crashes if not for special conditions)
      There a LOT of interesting glitches in this game. Like Super Glitch (yes, it's actually called that!), various glitch textboxes, a lot of interesting glitch items (there's one that makes the screen blank for example), the out-of-bounds is interesting, I could go on like this for a LOOONG time.

    • @TheRen0gade
      @TheRen0gade 3 года назад

      Also why capturing missingo and putting it in your bank causes issues? Based on my memory from around 20 years ago.

    • @Mabi19
      @Mabi19 3 года назад +1

      @@TheRen0gade It doesn't actually have to; it may've been that you've already caught a Cubone before and needed to put it in for it to register.

  • @undead890
    @undead890 4 года назад +1

    Who here is old enough to have played Pokemon Red and Blue when it first came out and use the Missingno item duplication glitch to duplicate rare candies to level all of your pokemon to max level?

    • @marcobonera838
      @marcobonera838 4 года назад

      I played it, but European versions were patched :(

  • @black_platypus
    @black_platypus 4 года назад +35

    17:28 "Seventy-twoth" :P
    ...Or is "Seventy-Tooth" a new Pokemon? :O

  • @aerospherology2001
    @aerospherology2001 4 года назад

    Fighting a certain Super Nerd on the glitched Route 8 (Lavender Town-Saffron City) of my German copy of Yellow causes the first item to be changed into a TM of Dragon Rage, IIRC, and to have an out of bounds inventory. It got glitched because I did the Mew glitch incorrectly and saved. It has glitched music, slower movement (I have to press A or B often there), crashes, etc. Sometimes I can't even reach the Super Nerd to do the glitch, since he's at the more unstable Saffron side. For his battle, the first one is normal but it does the battle again.

  • @jellopuddington
    @jellopuddington 3 года назад

    I don’t know anything about coding, or about pokemon... but this is fascinating

  • @warpster7656
    @warpster7656 4 года назад

    Epic videos my dude. You have just educated my inner child. Thank you

  • @Timc394
    @Timc394 3 года назад +1

    That border in the beginning made me think my screen was broken lol

  • @DoYouKnowWhoKnew
    @DoYouKnowWhoKnew 4 года назад

    My Brain crapped out at 16:00. But amazing video

  • @ariss3304
    @ariss3304 4 года назад

    Hello. I am currently reverse engineering and annotating minish cap in ghidra. These are some of the methods I use to analyze the program :)
    Gb and gba use a lot of bitwise functions since space was so tight back then; bitfields are used all the time! It can be frustrating trying to understand all of the shifts ands and ors etc.

  • @jimmyjimbo666
    @jimmyjimbo666 4 года назад +2

    10:51 I think you weren't able to rename symbols because the function was undefined. You should be able to define a function in the disassembly window by right clicking the start of the function and clicking "Create Function" :-)

  • @Keldor314
    @Keldor314 4 года назад +2

    Woo! Z-80 instructions! I remember my graphing calculator back in highschool used that CPU, and I used to do assembly stuff. Using an op code table and some graph paper to get hexadecimal machine code since I didn't have access to an assembler while sitting in class. Oh, and since the calculator did not have any non-volatile memory, just RAM and ROM, nor any concept of protected memory, any mistake in my programs would almost certainly crash the calculator and force a hard reset via removing batteries, which was literally a factory reset. Yay.
    ...Come to think of it, I actually had spare calculators that I won at math competitions. I wonder why I never thought to bring them along and use the link cable to back stuff up so I wouldn't have to reenter everything by hand. Although I think maybe the time when I was doing the assembly stuff was before I had won them?

  • @Andreas-vr3vs
    @Andreas-vr3vs 4 года назад +2

    I remember this trick from my childhood

  • @cryptearth
    @cryptearth 4 года назад +1

    imagine this would had been found during playtesting of original japanese 1st gen - maybe MissingNo would had never become such a meme ...
    I remember back in primary school - about 20 years ago - someone came up with that very crazy way to abuse safari zone to get to "sunny town" (it's basically raw game data / memory) and although we didn't knew what it is or what it may could be used for we did it over and over and over again
    a similar bug is possible on certain casio calculators (there're a few models which work) - it takes forever to set it up and requires a lot of precision - but in the end it freaks out completely - one can change a few inputs during the setup which, in combination with how much time has passed since last power on (I asume a very simple counter that keeps getting counted up the longer its powered on) + number of inputs and/or operations, does affect the output a bit
    search for "casio fx-85ms matrix" (or fx-82ms - which is the same but without the solar hybrid) and you'll find some videos - impressive how a simple school calculator can go full ham when you overload its firmware - would like an analyze of whats goin on with that party - but has to be some sort of inifite loop caused by some overflow ...

  • @trustyTankadin
    @trustyTankadin 3 года назад

    This was a lot of fun! Thank you!

  • @JDSacharok
    @JDSacharok 3 года назад

    Amazing! Thank you so much for this!