Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    M

    mGBA Blog

    mgba.io · Company blog · on HN since 2015

    The developer blog for mGBA, a Game Boy Advance emulator, covering emulation accuracy, hard-to-emulate bugs, and anti-emulation measures in games.

    Visit blogHN submissions
    Retro ComputingGamesSystems & Performance
    What HN says

    HN commenters link it as a source on GBA and NES anti-emulation tricks and on how timing-sensitive copy protection forces cycle-accurate emulation.

    Stats for nerds
    22HN people shared it
    19linked in comments
    905story points
    Jun 2024last shared
    2016people per year2024

    Top posts on HN

    1. 1
      The Infinite Loop That Wasn't
      3 people · 411 points · first shared 2020 · 35 comments on HN
    2. 2
      Classic NES Series Anti-Emulation Measures
      2 people · 215 points · first shared 2017 · 75 comments on HN
    3. 3
      “Holy Grail” Bugs in Emulation, Part 2
      3 people · 128 points · first shared 2017 · 30 comments on HN
    4. 4
      The Importance of Fuzzing Emulators
      1 person · 97 points · first shared 2016 · 12 comments on HN
    5. 5
      MGBA: Dumping the Undumped
      1 person · 25 points · first shared 2015 · 1 comments on HN
    6. 6
      “Holy Grail” Bugs in Emulation
      7 people · 7 points · first shared 2017 · Discussion on HN
    7. 7
      mGBA – Modern Gameboy Advance Emulator
      2 people · 5 points · first shared 2016 · Discussion on HN
    8. 8
      ​mGBA Adds Game Boy Support
      1 person · 4 points · first shared 2016 · Discussion on HN
    9. 9
      Revisiting “Holy Grail” Bugs in Emulation
      4 people · 3 points · first shared 2018 · Discussion on HN
    10. 10
      Emulation Accuracy, Speed, and Optimization
      2 people · 3 points · first shared 2017 · Discussion on HN

    What HN people wrote when they linked it

    • mikepurvisApr 2021

      This would be less about a user peripheral like the gamepad (which is obviously going to be read out exactly once per frame anyway) and more about getting subtle interactions between the CPU, memory/DMA, and specialized systems for graphics/audio correct. And not just correct after thousands of hours of work to smoke out the exact sources of specific title bugs, but correct essentially for free.

      See for example the tale of an absolutely wild mGBA investigation that was posted here a while ago:

      "What happens if an interrupt gets raised between prefetch and the data load? Will it start prefetching the interrupt vector before the invalid memory access? I quickly mocked this up in mGBA, turned on interrupts in the test ROM, and sure enough it broke out of the loop. So I tried the same test ROM on hardware and…it did not break out of the loop. So there goes that theory. Eventually I realized something. You saw that asterisk earlier I’m sure, so yes, there is one thing that can happen in between prefetch and the memory access, but only if the memory bus gets queried by something other than the CPU between the prefetch and invalid memory access."

      https://mgba.io/2020/01/25/infinite-loop-holy-grail/

    • nearMay 2018

      The Game Boy is only simple in the early stages of emulator development.

      You find quickly that it is full of excruciatingly complex edge cases that aren't documented, and aren't well understood by anyone.

      We're still making significant progress to this day on it.

      And even in the early stages, the Z80-like Sharp LR35902 is quite a hassle. If you want an educational project, consider an NES emulator instead. Still has lots of edge cases, but the documentation and reverse engineering work is far ahead of the Game Boy.

      Some reading if you like:

      https://mgba.io/2017/05/29/holy-grail-bugs/#pinball-fantasies

      https://mgba.io/2018/03/09/holy-grail-bugs-revisited/#the-phantom-of-pinball-fantasies

    • duskwuffJan 2020

      > A given game might be a hundred hours long and only exercise certain functionality at minutes 5, 37 and 60.

      An infamous bug of that variety exists in the SNES game "Speedy Gonzales - Los Gatos Bandidos", where one specific element in one level would freeze the game on most emulators due to a really subtle hardware emulation issue.

      https://mgba.io/2017/07/31/holy-grail-bugs-2/#speedy-gonzales-los-gatos-bandidos

      > Also, none of that automation you just did will work w/the actual hardware.

      You might be surprised. Consider what the TASBot team has done with the NES, SNES, and various other consoles -- http://tasvideos.org/TASBot.html

    • matheusmoreiraAug 2021

      > also in later years I suspect made the job of emulator writers something of a misery

      Most certainly. These tricks force developers to emulate systems down to individual cycles in order to get the timing right because getting them wrong will result in visual glitches or worse.

      https://mgba.io/2017/04/30/emulation-accuracy/

      https://mgba.io/2017/07/31/holy-grail-bugs-2/

      Byuu, the author of bsnes, wrote some very detailed articles about this as well. I can't seem to find them anymore though. His domain has also been excluded from the internet archive for some reason.

    • mattbeeJun 2024

      The simplest trick for detecting old ARM emulation - ISTR was used on some Gameboy Advance copy protection: store a booby-trap instruction at PC+4 (i.e. the very next one). A real ARM has a pipeline that reads PC+8, while decoding PC+4 and while executing at PC. So the newly-stored instruction should have no effect. An emulator (which didn't emulate the hardware pipeline) would execute it.

      edit: described in more detail here, among other emulation-busting measures from 2004 https://mgba.io//2014/12/28/classic-nes/

    • jdietrichJul 2018

      Implementing a well-documented spec is fairly mundane, but figuring out that spec on your own is a fascinating puzzle. Emulators are full of curious little edge cases that can drive people to the point of obsession.

      https://mgba.io/2017/05/29/holy-grail-bugs/

    Related

    Dolphin Emulator Blogdolphin-emu.org183 people

    Ubershaders: A Ridiculous Solution to an Impossible Problem

    Dolphin Emulator Blog
    Company · last shared 2026
    byuubyuu.org77 people

    Color Emulation

    byuu
    Personal · last shared 2023
    Shonumishonumi.github.io21 people

    Glucoboy

    Shonumi
    Personal · last shared 2026
    CellPerformancecellperformance.beyond3d.com19 people

    Three Big Lies (2008)

    CellPerformance
    Personal · last shared 2025
    Arduino Blogblog.arduino.cc121 people

    The Arduino IDE 2.0 beta

    Arduino Blog
    Company · last shared 2026
    Trixtertrixter.oldskool.org63 people

    8088 MPH: We Break All Your Emulators

    Trixter
    Personal · last shared 2026
    CTurtcturt.github.io30 people

    Writing a Game Boy emulator

    CTurt
    Personal · last shared 2024
    Bitsquid Blogbitsquid.blogspot.com25 people

    Allocation Adventures: The Buddy Allocator

    Bitsquid Blog
    Company · last shared 2025