Hacking the Game Boy cartridge protection

Sdílet
Vložit
  • čas přidán 27. 03. 2020
  • In this video we hack the GameBoy cartridge protection by building our own GameBoy cartridge using an FPGA!
    You can find the FPGA source-code on my Github here: github.com/ghidraninja/gamebo...
    - ModernVintageGame on the CIC chips: • Secrets of the Nintend...
    - The Gbdev wiki: gbdev.gg8.se/wiki/articles/Ma...
    Equipment used in the video:
    - FPGA Board: Digilent Arty 7
    - Level shifters: TXS0108E
    - A GameBoy...
    Errata:
    - I messed up the resolution - the logo is 48px by 8px, not 96px by 16px!
    You can also find me on Twitter: / ghidraninja
  • Věda a technologie

Komentáře • 483

  • @ModernVintageGamer
    @ModernVintageGamer Před 4 lety +725

    amazing work and great video !

    • @visaa78
      @visaa78 Před 4 lety +10

      I was wondering why youtube would recommand me this channel but it is because of you !

    • @alexjones3035
      @alexjones3035 Před 3 lety +7

      Thanks for crediting Stack Smashing in your recent video on the GB's bootloader, MVG - another cool hardware channel to add to my subs! :)

    • @ryangraham9623
      @ryangraham9623 Před 3 lety

      Stacksmashing, mvg, and live overflow. The gang is all here

    • @JaredConnell
      @JaredConnell Před 3 lety +2

      I always get a kick out of seeing that my favorite CZcams channels watch each other lol

    • @kylorage5964
      @kylorage5964 Před 3 lety

      Couldn't agree more!!

  • @pierredonias8940
    @pierredonias8940 Před 4 lety +233

    That awkward pause at the end to reach the advertisable video length ;)

    • @stacksmashing
      @stacksmashing  Před 4 lety +179

      *coughs*

    • @anunayy
      @anunayy Před 4 lety +71

      CZcams is weird, Why put a minimum advisable length, it only encourages long and cringy videos while real gems like these are left behind.

    • @HA7DN
      @HA7DN Před 4 lety +18

      No use, Nintendo will claim it / disable ads...

    • @Reth_Hard
      @Reth_Hard Před 4 lety +11

      @@HA7DN
      *Knock! Knock!*
      Who's there?

      😈 *NINTENDO* 😈

    • @qn2h
      @qn2h Před 4 lety +4

      There aren’t any ads on the vid

  • @etansivad
    @etansivad Před 4 lety +41

    This is wonderful. Thank you for posting it.
    I'm really stunned with how far FPGA boards have progressed. I hope you release the GB cartridge soon! My son has been fascinated since I showed him how we can use my oscilloscope to sniff the datalines of the SNES controller bus in real time. This led into a discussion of different pin types and how we could sniff other types and how you might glitch them. This is perfect because I can setup a bread board to branch off from my Super Game boy.

  • @robertoborgen3781
    @robertoborgen3781 Před 3 lety +165

    I actually wondered back then, why they didn't develop that bootup logo with variations or animation from the game or "presented by Pepsi cola" etc

    • @SuperSmashDolls
      @SuperSmashDolls Před 3 lety +25

      You can technically animate the screen by not clearing VRAM and instead doing something else with the screen the moment the BIOS gives control. Several demos do this. However, this was most likely prohibited by Nintendo's cert requirements; they probably wouldn't want someone doing this with their trademarks.

    • @KopperNeoman
      @KopperNeoman Před rokem +2

      @SuperSmashDolls You would also need version detection for Game Boy, Super Game Boy, and Game Boy Colour and up or it'll look bizarre.

    • @wupme
      @wupme Před rokem +3

      Because you would still distribute the Nintendo logo illegally, even when its not shown on boot.

    • @finthegeek
      @finthegeek Před rokem +1

      you could just add 2 extra screens that say "produce" "gameboys" - then it's no longer a trademark violation but a statement of fact

    • @robertoborgen3781
      @robertoborgen3781 Před rokem

      @@finthegeek Nah, you still didn't have the right to recreate the logo

  • @spokehedz
    @spokehedz Před 4 lety +76

    Gotta love it when you can't wait for a PCB to arrive, so you just go and make one... And then design the PCB anyway, and release it for others! Nice!

  • @hoxorious
    @hoxorious Před 4 lety +2

    Whenever I receive a notification that you have uploaded a new video, I immediately stop whatever I was doing and sit to watch your video. What an awesome work. Keep up the good work! ✌❤

  • @djsvrlaivwfofj
    @djsvrlaivwfofj Před 4 lety +3

    I am looking forward to more beginner Ghidra tutorials from you on your channel, they are very helpful!

  • @alexjones3035
    @alexjones3035 Před 3 lety +1

    Came here from the MVG video on the GB bootloader, this is awesome. I look forward to watching your other videos! :D

  • @heyitsandrew2209
    @heyitsandrew2209 Před 3 lety +1

    Quickly becoming one of my favorite youtube channels. This guy is going places!

  • @zosxavius
    @zosxavius Před 4 lety +33

    Name dropping MVG? Instant subscribe. This was interesting too. I sort of knew this but didn't realize how simple it was.

  • @HyperHunt621
    @HyperHunt621 Před 3 lety +2

    I’ll be completely honest. I have no idea what any of this really means, but I’m just fascinated by the technical jargon and seeing how things work, and you actually have a pretty chill voice, too, so I’ve subscribed. ^_^

  • @traida111
    @traida111 Před 3 lety +4

    every video i watch just blows my mind. its like decades of thinking 'what if', what if i got into this stuff and was good at it, what would it look like...? your videos are like painting the experience to my imagionation. Very satisfying. To see all this stuff is just incredible. I notice all the places I would have probably got stuck (so many times) and it just blows my mind. not to mentioned the quality of your editing. you are epic bro

  • @Geneo-en5km
    @Geneo-en5km Před 3 lety +4

    You are just amazing... You make it so much easier to understand how games and their consoles work together. Ive always had an interest in programming and hacking and with your knowledge and great explanations I'm able to move forward with my own projects.. Thanks and awsome videos.

  • @InsaneFirebat
    @InsaneFirebat Před 4 lety +160

    Clever license protection, for its time.

    • @namuh5799
      @namuh5799 Před 4 lety +3

      aw man you profilepic is freakin cool
      almost want to steal but that would be uncool

    • @InsaneFirebat
      @InsaneFirebat Před 4 lety +4

      It's from the Super NES game, Super Metroid. It IS the Super Metroid. So I don't own it either :)

    • @namuh5799
      @namuh5799 Před 4 lety +3

      @@InsaneFirebat yeah yeah I know. But still It's not cool if theres more than 1 with that pic.

    • @KuraIthys
      @KuraIthys Před 4 lety +24

      It sounds clever.
      But Sega tried more or less the same thing, it got to court, and was ruled unenforceable.
      The legal judgement was something to the effect that because you HAD to include this trademarked logo to get any software running, you had no choice in the matter, and thus couldn't be prosecuted for it...
      These kind of things seem pretty clever, but they rarely seem to work in the company's favour in court, because courts seem to favour allowing people to write their own software for a given hardware platform over protecting the platform owner...

    • @GeorgeHafiz
      @GeorgeHafiz Před 4 lety

      @@InsaneFirebat It's grown up Baby Metroid!

  • @yowhat3745
    @yowhat3745 Před 4 lety +7

    That was a clever way of copy protection! Really interesting video, well done!

  • @PASTRAMIKick
    @PASTRAMIKick Před 4 lety +16

    They could've multiplexed the first 8 Address lines to behave as Data Lines sometimes, you'd only need an 8-bit latch to hold the address before a data read or write. That's how the old 8086 CPU worked, still a pretty cool workaround to having 8 extra pins.

    • @SerBallister
      @SerBallister Před 3 lety

      I think the GBA did something like that. If I remember speaking to an engineer doing it at the time, he said the bus can auto-increment addresses too so you're not clocking in a new address every fetch.

    • @davidthacher1397
      @davidthacher1397 Před 3 lety +1

      You can multiplex all of them. Few different approaches exist here. They can also may write through section of map which controls address window.

    • @mikecrapse5285
      @mikecrapse5285 Před rokem

      I think they wanted to simplify and reduce costs for cartidges

    • @DriftHyena
      @DriftHyena Před rokem

      N64 carts work in the same way. Once a high and low address is latched it just strobes the read pin and the ROM automatically adds 2 to the address for every edge (word aligned access)

  • @0dyss3us51
    @0dyss3us51 Před 4 lety +34

    Nintendo lawyers from the 90's enters chat. This is really fascinating haha, great vid!!

    • @JWG.LLC_The_Artist
      @JWG.LLC_The_Artist Před 3 lety +1

      Sega sued Accolade for that exact thing and lost the Cort case. If the system requires the logo to be displayed. Then there is no copyright infringement
      accolade vs sega "Accolade's acts of reverse engineering Sega Genesis software to learn about its security systems and subsequent publishing of unlicensed Sega Genesis games are protected under the fair use doctrine of copyright law. Sega is held responsible for using its security system to place its trademark on Accolade's games."

  • @fredericodargel9919
    @fredericodargel9919 Před 4 lety +17

    it will be perfect for gameboy's re-shells that has "game girl" on it.

  • @timseguine2
    @timseguine2 Před 4 lety +34

    I always wondered why the logo was blank if you didn't insert a cartridge.

    • @ls190v2
      @ls190v2 Před rokem +1

      It's not integrated into the system itself, as you now know.

  • @TheCarpenterUnion
    @TheCarpenterUnion Před 3 lety

    Remarkably simple. This is an excellent entry point for anyone looking to get into hardware hacking. Great video! 👍

  • @Lele-km9zr
    @Lele-km9zr Před 4 lety +3

    Sehr interessantes und informatives Video! Super cool wie solche Technik früher funktioniert hat

  • @alixxworkshop846
    @alixxworkshop846 Před 3 lety +9

    This guy has some serious engineer skills... I'm amazed!!!

  • @androxilogin
    @androxilogin Před 4 lety +1

    That is pretty in-depth and awesome information. Great video!

  • @TQ255
    @TQ255 Před 4 lety +6

    Incredible, never knew they already made this technique inside the gameboy

  • @XTJ7
    @XTJ7 Před 4 lety +2

    That was very informative and a good presentation. Well done!

  • @thevideoman12
    @thevideoman12 Před 3 lety +4

    i dreamt about doing things like this since when i was a kid. this fueld my interest and carrer significantly. thanks, gameboy.

  • @joan7770
    @joan7770 Před 4 lety +4

    This is very awesome, would love to see something similar for the game boy advance

  • @devilio
    @devilio Před 3 lety

    Nice work there! I was watching this with pleasure, thanx for that!

  • @somehow_sane
    @somehow_sane Před 4 lety +7

    That is really interesting. I always enjoy learning new things about old tech!

  • @y1ink
    @y1ink Před 3 lety

    Love the vid awesome work. Just binge watching all your vids

  • @Laflamablanca969
    @Laflamablanca969 Před 4 lety +18

    I would happily watch a few ads to help encourage you to make more videos of this type. Your skills are insane 👍

  • @AlmightyGauss
    @AlmightyGauss Před 4 lety +1

    Excellent content as usual!

  • @0906WEST
    @0906WEST Před 4 lety +1

    Great content man. Keep it up! 👍🏻

  • @stevenspring9889
    @stevenspring9889 Před 3 lety

    You are an inspiration, I'm a small tech youtuber doing some videos on the pi, IT career tops etc.. love your content man.

  • @NicolaSelenu
    @NicolaSelenu Před 4 lety +1

    amazing job! thanks for sharing your findings

  • @Jaredo66
    @Jaredo66 Před 4 lety +117

    Mistakes Were Made - How the Gameboy copy protection was defeated

    • @bangerbangerbro
      @bangerbangerbro Před 4 lety +1

      I don't get the joke.

    • @arunraman6630
      @arunraman6630 Před 4 lety +9

      @@bangerbangerbro Watch MVG

    • @bootmii98
      @bootmii98 Před 3 lety

      it's trademark protection, like Sega TMSS

    • @hagen-p
      @hagen-p Před 3 lety

      "Mistakes were made." - Well, not for the time when it was invented. FPGAs were prohibitively expensive at the time, so were ASICs.

  • @stevenhoneyman
    @stevenhoneyman Před 4 lety +2

    The breakout PCB looks useful, looking forward to the gerbers being released :)

    • @user-ww2lc1yo9c
      @user-ww2lc1yo9c Před 4 lety +1

      With coronavirus floating around, you really want more things to be released into the public?

  • @Urbanstrangler
    @Urbanstrangler Před 4 lety +2

    This was inspiring. This was fascinating.

  • @billigerfusel
    @billigerfusel Před 4 lety +3

    Wow, that's really easy to extract a cartridge rom. Thought it would be more difficult than just a parallel read after seeing the Snes protection.

  • @saeedmahmoodi7211
    @saeedmahmoodi7211 Před 4 lety +7

    I want 1 video every day, I enjoy this more than all animes

  • @failuretolife5623
    @failuretolife5623 Před 3 lety +2

    Even though I wouldn’t take the time to do this, I love watching.

  • @redd_cat
    @redd_cat Před 4 lety +4

    Nice Hackers reference with "Hack the planet" on the PCB at the end

  • @Frangoose
    @Frangoose Před 4 lety +1

    Fantastic & inspiring video!

  • @greatsaid5271
    @greatsaid5271 Před 4 lety +2

    as always great video, thank you sir

  • @heycherry100
    @heycherry100 Před 4 lety

    This video is amazing! Good job!

  • @shazmosushi
    @shazmosushi Před 3 lety

    Good channel, with great content. Keep up the great work.

  • @Ecclesiasticus
    @Ecclesiasticus Před 4 lety +3

    Collaboration between two wonderful engineering channels, amazing. Shove a CodeBullet or CodeParade in there too!

  • @willnilges8131
    @willnilges8131 Před 3 lety

    This is the kind of content I crave.

  • @sinistergeek
    @sinistergeek Před 4 lety +2

    glad to hear you bypass the nintendo logo !! ...

  • @seagull179
    @seagull179 Před 3 lety

    Such an amazing video! Instant subscribe.

  • @DanielLopez-up6os
    @DanielLopez-up6os Před 3 lety

    Your Channel is just awesome!

  • @kevinwydler4405
    @kevinwydler4405 Před 4 lety

    Love these videos!

  • @SuperSmashMarco
    @SuperSmashMarco Před 3 lety

    This was an amazing video!

  • @lolomixed6442
    @lolomixed6442 Před 3 lety

    Even If I don´t understand too much about this. It´s quite satisfaying to watch this videos.

  • @andybrychenko
    @andybrychenko Před 4 lety +1

    Super cool video, thank you!

  • @felipebevi
    @felipebevi Před rokem

    this knowlegde is awesome! congratulations and thank you for the video! ;-)

  • @mwbgaming28
    @mwbgaming28 Před rokem +2

    Imagine bringing one of these back to the 1990s

  • @espenskog8745
    @espenskog8745 Před 3 lety

    You presented this very well and kept it simple, tidy and interesting. Great job :)

  • @PrathapReddy1036
    @PrathapReddy1036 Před 4 lety +1

    Awesome work ninja you rock ,,,,,,

  • @hagen-p
    @hagen-p Před 3 lety

    Nice work. You could simplify the FPGA code slightly by just replacing the logo address range during the first read, and otherwise just always return the original ROM data. After all, the ROM already contains the correct logo.

  • @leonardodepinto7912
    @leonardodepinto7912 Před 4 lety

    Dude you have earned my subscription

  • @floatingblaze8405
    @floatingblaze8405 Před 4 lety +3

    Every single concept of this video is pure gold... Yes, even the comments.

  • @rattehalliravishankar1801

    Excellent work. You are genius.

  • @kutay9346
    @kutay9346 Před 3 lety

    So much effort in this video.

  • @MattDeLuco
    @MattDeLuco Před 3 lety

    Nice Hackers reference on the breakout cart ;)

  • @OmeedNOuhadi
    @OmeedNOuhadi Před rokem +1

    Congratulations! 👏👏👏

  • @nrdgrrrl
    @nrdgrrrl Před rokem

    That is the coolest thing I've ever seen!

  • @rfrohn123
    @rfrohn123 Před 4 lety +1

    Great video. Thanks

  • @konstero
    @konstero Před 3 lety

    Very well explained!

  • @villahed94
    @villahed94 Před 3 lety

    Analyzing the video, I came up with another idea that would have been possible with technology of the day.
    Since you mentioned the presence of a 1mhz clock signal, you could power a very small microcontroller that could just count cycles and since the boot process always takes the same amount of time , swap the hacked logo bank and the original one based on said counter.
    And it could be a very small additional ROM just mapped to the address.

  • @hikaru-live
    @hikaru-live Před 2 lety

    For the level shifting, it may be a better idea to use IMO level shifting chips with external direction control like SN74LVC16T245 for the address and signal lines. Those chips needs control signals, but thise can be derived from the CS, RD and WR pins using some 74LVC1Gxx logic. This means for the target board it can be directly connected without the need of level shifters, and since those SN74LVCxxT245 chips contains line redrivers, you can even run longer wires with little ill effects. Also you can include an op amp like LMV321 to buffer the audio line, basically also a redriver.

  • @GermanAnimeStriker
    @GermanAnimeStriker Před 4 lety

    Pretty great work! Thanks

  • @taskanawa9604
    @taskanawa9604 Před 4 lety +1

    awesome work

  • @dstarfire42
    @dstarfire42 Před 3 lety +1

    A lawsuit in the early 90's removed the legal underpinnings for this sort of usage of trademarks as a form of copy protection. lookup Sega vs. Accolade for more info. Accolade published unlicensed games that used Sega's copy-protection code including the part that displayed the Sega logo. A court eventually ruled that the code usage was fair use and Sega's act of requiring display of a trademark for a game work was an "improper use" of trademark because it served to limit competition which is the function of patents and not trademarks.

  • @mohamededrees979
    @mohamededrees979 Před 3 lety

    Wow brilliant work these remarkable

  • @danimoyano2183
    @danimoyano2183 Před 4 lety

    You guys have a lot of spare time in your life

  • @MrMegaManFan
    @MrMegaManFan Před 3 lety

    @ModernVintageGamer has a LOT of great videos on things. Watching his channel is undoubtedly why I was recommended yours (and subbed)

  • @bangerbangerbro
    @bangerbangerbro Před 4 lety +3

    So the cartridge "protection" works just like in the Mega Drive? Interesting video by the way!

  • @DmitriLeon2000
    @DmitriLeon2000 Před 3 lety +5

    Li Cheng Industries-published Game Boy games has the Nintendo logo modified to read "Niutoude".

    • @SuperSmashDolls
      @SuperSmashDolls Před 3 lety +2

      That doesn't use this exploit - AFAIK CGB just doesnt check the bottom half of the logo

  • @linc_gb
    @linc_gb Před rokem

    It's a little harder for the user and more expensive, but it's possible to load one game's Nintendo logo by inserting its cartridge, turning on the console, and swapping it with the hack game. This also makes it possible to boot into worn down games to see what actually happens there. I tested it myself by inserting 007 Nightfire, turning on my DS, and swapping it with MKSC. I know it's GBA but all 3 consoles in the Game Boy family have the same boot screen function, but the graphic and sound effect are different for each model (minus the GBA's backwards compatibility).

  • @metalgrimm
    @metalgrimm Před 3 lety +6

    should've replace "Hacked" text into "Hello World"

  • @Joooooooooooosh
    @Joooooooooooosh Před rokem

    Reminds me of how the AIM protocol used to request a CRC of a random range of bytes from the official AOL client, making it very difficult for a third party client to use the protocol without bundling or referencing the copyrighted client exe.

  • @SyphistPrime
    @SyphistPrime Před 4 lety +2

    It only took 31 years, but it has finally been done.

    • @ClipOrDeath
      @ClipOrDeath Před 3 lety +2

      well, some bootleg cartridges did this back then

  • @blakegriplingph
    @blakegriplingph Před 4 lety +1

    Interestingly, a similar hack was demonstrated by Argonaut Games to Nintendo. Normally this would've ended up in a lawsuit, but Ninty was reportedly impressed by it that Argonaut became one of their partners, eventually culminating in _Star Fox_ for the SNES.

  • @Bud-Spencer
    @Bud-Spencer Před 4 lety +1

    Nice video. Thank you

  • @Florian.Dalwigk
    @Florian.Dalwigk Před 3 lety

    Nice!

  • @Shadow__X
    @Shadow__X Před rokem

    making a mechanism to be able to sue people more easily instead of actual copy protection is one of the most nintendo things nintendo has ever done

  • @adultmoshifan87
    @adultmoshifan87 Před 3 lety

    I have a Mega Memory cartridge (onto which you can backup game saves) and unless used on a Game Boy Advance, it says "Megamem" instead of Nintendo but it still runs fine! There's also a Smartcom personal organizer cartridge that says Smartcom instead of Nintendo but still boots fine (although I've heard it's not compatible with the Game Boy Advance) and Rocket Games' unlicensed Game Boy Color games say ROCKET instead of Nintendo but again they still run fine!

  • @natnaeltadu
    @natnaeltadu Před 4 lety +2

    Bro You are genius. You know that right.

  • @runforitman
    @runforitman Před 3 lety

    youtube out here guessing my interests again
    knows I already watch, and like, liveoverflow and am interested in electronics

  • @N3tech
    @N3tech Před 3 lety

    A project I may work on once I finish my senior design, would be to make a similar cartridge but build an FPGA onto it... may be a fun way to mess around with verilog and some game boy stuff.

  • @benricok
    @benricok Před 4 lety +6

    Here from liveoverflow✌🏼

  • @ethzero
    @ethzero Před rokem

    Very nice! subbed.

  • @konatadesuka
    @konatadesuka Před 4 lety

    This was also leveraged by Sony on the PSOne, not the original Playstation that had the wobble track copy protection but the later version, the small one.
    The original one displayed whatever logo the disc had, the PSOne checked against a ROM stored logo and if they didn't match, the console didn't boot the game.

  • @alexpantagruelico
    @alexpantagruelico Před 4 lety +2

    I'm jealous of your knowledge, what is your academic background?

  • @Bobur1777
    @Bobur1777 Před 4 lety

    You can use an ice40 fpga or one of those chinese $5 fpgas for the cartridge. It's also possible to load the binaries of a game to the internal block ram of the fpga. Or if you're feeling adventurous, add a microsd card slot in which you can read from the fpga.

    • @stacksmashing
      @stacksmashing  Před 4 lety

      Yea the problem is getting an ICE40 board with enough IOs and enough RAM - I wanted to try it on one of my ECP5 boards though

  • @rasputunga
    @rasputunga Před 2 lety

    Some days ago I bought the gamboy cartrdige breakout port and I want to build something similar to this. I am a newbie with this kind of projects and I have a doubt about the forwarder: do you synchronize in some shape or form the FPGA clock and GB one?
    Thanks for these amazing videos!

  • @shobhitverma2478
    @shobhitverma2478 Před 3 lety

    Awesome video

  • @TheEkkas
    @TheEkkas Před 4 lety +1

    Well done, awesome dude.
    Keep hacking.