N-EMU · Retro game emulatorv0.9.13Support the developer
Development storiesPosted Thor's Workshopv0.9.13

A number written down wrong

Mega Drive games would not run at all on Android. One number — a screen height recorded sixteen lines shorter than it really is — was the cause, and several layers of checks missed it for months.

Pre-release development record

N-EMU handles eleven systems. Each has its own screen size, so those numbers are kept in one place that both iOS and Android read. Write it once and the two cannot disagree — that was the idea.

The Mega Drive entry said 320x224. What the core actually hands over is 320x240. Sixteen more lines arrive.

Android builds the box that holds a picture from that number. The box was twenty thousand bytes short, so no picture fit and only “Native engine error 7” was left. Not one frame of a Mega Drive game was ever drawn.

iOS was fine. It never copies the picture into a box; it draws from where the picture already is. Knowing the wrong size could not hurt it.

That is why it went unfound. The iOS check already knew the Mega Drive produces either 224 lines or 240, and was written to accept both. The side that knew the truth could not be hurt, and the side that could be hurt never checked. Both sets of checks were green.

Finding it was not luck but order. Counting what had actually run on real hardware showed six systems had never once been switched on. A test cartridge was made so they could be checked without owning a game, and running them one after another on a tablet, the Mega Drive’s turn produced the error.

The number is now 320x240. A game that chooses the 224-line mode fits inside it. The picture also has the machine’s own 4:3 shape again. And a new check makes sure every system’s frames fit the size written down for it — which caught this the moment it was added.

  1. Development storiesv0.9.11

    A foldable display shaped like a Nintendo DS

    Unfold a foldable and it can use its display as two. A Nintendo DS also has two screens. That shared shape is now used: on an unfolded display the upper screen is given room and the touch screen sits between the pad and the buttons, as it does on the machine itself.

  2. Development storiesv0.2.0

    Bringing several systems into one app

    Several emulator cores are connected so you can choose games and manage saves from the same library across systems.

Back to newsSystems and features

Support N-EMU development

Your support helps N-EMU grow. Contributions help cover developer accounts, test devices and ongoing work on the app. App features are the same whether or not you contribute.