Skip to content
Wanted files

MasterGear emulates Sega Master System, Sega Game Gear, Sega SG-1000 and 2 more systems. It reads 8 files, 1 of them required: without a required file it does not start games. A required file is needed only by the machines that use it. Each file below cites the line of source code that reads it.

About this profile
Detail Value
Type standalone
Classification Other
Source https://fms.komkon.org/MG/
Upstream closed-source
Version 4.9, read from com.fms.mg APK versionName (versionCode 4900)
Releases announced at https://play.google.com/store/apps/details?id=com.fms.mg&hl=en (version 4.9.13 announced there, found only as rebuilt copies)
Profiled 2026-08-12
Profile YAML, JSON
Cores mastergear, com.fms.mg
Systems Sega Master System, Sega Game Gear, Sega SG-1000, Sega SC-3000, Sega SF-7000
Author Marat Fayzullin (Garage Research)
Technical notes

Sega 8bit emulator by Marat Fayzullin, covering Mark3, MasterSystem, MasterSystem 2, GameGear, SG1000, the keyboard-equipped SC3000 and the disk-based SF7000. Two builds of version 4.9 were read. The Android package com.fms.mg is sold on Google Play and not carried on the author's site, so it came from a mirror. That copy has versionName 4.9, versionCode 4900, sha256 11c3f3331d6774739c11dfd604f74f545a17ceba3feb7fb294f02bd80943af35, md5 2cb4df11254f8525e0a2253677450555, and is accepted because its v1 certificate is the author's own key, CN=Marat Fayzullin O=Garage Research issued 2011, fingerprint d09469e9b550cbc9005d3bd089f3df5f0ba89cba71cdd3b33736a0382d6f9848, beside a Play distribution source stamp in the signing block. The free MG 4.9 builds for Windows and Ubuntu, published by the author, were read next to it and open the same files. The native libraries keep their symbol tables, so the Android readings below cite libmain.so offsets in the x86_64 slice, and the arm64-v8a, armeabi-v7a, armeabi and x86 slices carry the same filename set. No source has been published: every MG download on the site is a binary package, while ColEm and fMSX on the same site ship source archives. ref: MG-Android-4900.apk META-INF/CERT.RSA, https://fms.komkon.org/MG/, MG49-Windows-bin.zip, MG49-Ubuntu-x86-bin.tgz (sha256 25c8a0de74ed6eda, mg sha256 2d6b714cdbd4e6bd)

SF7000.ROM is the only system ROM either binary names, and it is read through the cartridge loader. ResetSMS loads it whenever the requested hardware becomes SF7000. LoadROM returning zero makes ResetSMS clear the SF7000 bits and restore the previous hardware, so LoadDSK finds the machine still is not an SF7000, ejects the image and fails, logging "Failed switching into SF7000 mode." when verbose output is on. Nothing about the file is checked: the size comes from a seek to the end, is rounded up to the first power of two of at least 16kB, and the buffer is filled with FFh before the read, so a short image is padded rather than refused. When bit 15 of the mode word is set, a successful load is followed by patching the image at eight fixed addresses, 0008h, 0010h, 0018h, 0020h, 0028h, 0030h, 107Ch and 10F8h, with an EDh FEh C9h trap and a checksum byte. ref: libmain.so ResetSMS 0x435a0-0x43b0d (LoadROM 0x43604, revert 0x4367d, patch loop 0x43619-0x4367b), LoadROM 0x43c80-0x4451a (open 0x43db3, size 0x43dfa-0x43f1a, read 0x43f4f), LoadDSK 0x46db0-0x46ecb, MG49-Ubuntu-x86-bin mg 0x3d0fd-0x3d124, 0x3c330 (0x3ca58)

The other machines open no system file. SF7000.ROM is the only system ROM name in either binary, and the desktop build references it once, from the SF7000 branch of the reset routine, so MasterSystem, GameGear, SG1000 and SC3000 start straight into the cartridge. The SC3000 BASIC arrives as a cartridge like any other program: the packaged title database keys Basic 2.10 and Basic 3.10 by cartridge CRC32 under the SC3000 heading. ref: MG49-Ubuntu-x86-bin mg 0x3d0fd (sole reference to SF7000.ROM at 0x5231a), libmain.so ResetSMS 0x43604, assets/names.dat

On Android one directory holds everything. MainActivity hands EMULib.k() to jniStart, which copies it into the buffer GetHomeDir returns and passes that same buffer to SetPrivateDir. Every open goes through mopen, then OpenRealFile, which tries the name as given and again as <PrivateDir>/<basename>, keeping the larger of the two when both open. That directory is external storage joined with the application label up to its first space, so /sdcard/MasterGear, falling back to getExternalFilesDirs(null) when it is not a writable directory, and the cheat archive the author publishes writes the same path out in full. The desktop builds have no such directory and open every name where they stand. Every one of these opens ends in zlib, mopen handing the descriptor OpenRealFile returned to gzdopen while the disk loader and the desktop builds call gzopen straight, so each file also opens gzipped, and on Android a content:// name is routed to the Android storage framework instead. ref: MainActivity.java:2265-2276, EMULib.java:456, 494-553, 688-698, libmain.so jniStart 0x18bb0-0x193e1 (0x1921c, 0x1926c), SetPrivateDir 0x38f80, OpenRealFile 0x39190-0x393c3, mopen 0x393d0-0x3959d, LoadFDI 0x558f7, MasterGear-Cheats.zip ROOT.chts

8 files: 1 required, 7 optional. 2 more files come with the app.

By kind: 1 BIOS and 9 game data.

In this collection: 3 in repo, 0 missing and 5 unsourceable.

FileStatus

SF7000.ROM

SF7000 IPL, read into the cartridge window before the machine starts

  • System: Sega SF-7000
  • Loaded whenever the hardware becomes SF7000, and the only fixed ROM name in the binary. A failed open drops the emulator back to the previous hardware, which makes every disk image refuse to mount. The loader checks neither length nor contents, so an 8kB image is padded to 16kB with FFh and no hash is compared. Opened by bare name, so it resolves against the working directory and, on Android, against the home directory as well, and a gzipped copy answers too.
Source
  • Source: offset 0x435a0-0x43b0d in libmain.so ResetSMS (LoadROM 0x43604), offset 0x43c80-0x4451a in LoadROM, offset 0x46db0-0x46ecb in LoadDSK, offset 0x3d0fd-0x3d124 in MG49-Ubuntu-x86-bin mg
required for Sega SF-7000 in repo
FileStatus

MasterGear-Cheats.zip

cheat database read by the Cheatopedia browser

  • The Android build ships no cheat set. Cheatopedia looks for ROOT.chts in the package assets, then in the home directory and its subdirectories, and takes it from this archive in the Downloads directory, unpacking it into <HomeDir>/Cheats when it is newer. The author publishes it at fms.komkon.org/EmuAndroid/ and the copy read here carries ROOT.chts plus crystal-warriors-gg, dragon-crystal, gamegear, phantasy-star and ultima. No hash is recorded because the archive is refreshed in place at that address.
Source
  • Source: Cheatopedia.java:340-391, Cheatopedia.java:414, Cheatopedia.java:565-584
optional in repo game data

custom.chts

user cheat sets added to the Cheatopedia menu

  • Pulled in by the File= directive that ROOT.chts carries, written out as /sdcard/MasterGear/custom.chts, and reached through the same lookup as any other set: package assets, then an absolute path, then the cheat directory.
  • Not collected yet: cheat codes the user writes (files not collected yet)
Source
  • Source: Cheatopedia.java:504-508, Cheatopedia.java:565-584, MasterGear-Cheats.zip ROOT.chts
optional unsourceable game data

Controls.png

virtual joystick skin

  • Read as <HomeDir>/Controls.png when the joystick shape is set to Custom Skin, and by the layout editor. The author publishes a 320x276 template at fms.komkon.org/EmuAndroid/Controls.png to draw over.
Source
  • Source: MainActivity.java:1809, LayoutEditor.java:99
optional in repo game data

Backdrop.png

backdrop drawn around the emulated screen

  • Read as <HomeDir>/Backdrop.png while the decorum option is on. A built-in drawable stands in when the file is absent.
  • Not collected yet: any picture the user places behind the emulated screen (files not collected yet)
Source
  • Source: MainActivity.java:1047-1051
optional unsourceable game data

<game>.back.png

backdrop for one title

  • Named from the loaded ROM path and preferred over the shared backdrop for that game.
  • Not collected yet: any picture the user places behind one title (files not collected yet)
Source
  • Source: MainActivity.java:1047-1049
optional unsourceable game data

<game>.ips

IPS patch applied to the loaded cartridge

  • Named from the ROM path by MakeFileName and applied by LoadIPS when present. A patch opened by hand reaches the same loader through LoadFile.
  • Not collected yet: a patch the user supplies for one title (files not collected yet)
Source
  • Source: offset 0x444bf-0x444e1 in libmain.so LoadROM, offset 0x43b10-0x43b9f in LoadFile, offset 0x467e0 in LoadIPS, offset 0x5b1e0 in ApplyIPS
optional unsourceable game data

<name>.cht

cheat codes loaded from the file selector

  • LoadFile compares the tail of the name against .CHT through a case folding compare and sends a match to LoadCHT, so the name is the one the user picked rather than one derived from the ROM path. The built-in menu writes edited cheats back under the same extension.
  • Not collected yet: cheat codes the user writes or collects (files not collected yet)
Source
  • Source: offset 0x43b10-0x43b2f in libmain.so LoadFile, offset 0x46a40-0x46b8f in suffix compare, offset 0x46b90-0x46c9b in LoadCHT, offset 0x48bf1 in MenuSMS
optional unsourceable game data
FileStatusHash

names.dat

title database keyed by system and CRC32

  • Parsed from the package assets as lines of key colon title, keys reading SMS-0274179A. The copy at <HomeDir>/names.dat is read straight afterwards into the same map, so user entries extend and override the packaged ones.
  • Size: 20.7 KB, SHA1 15f93bd7b0e5
Hashes and source
  • SHA1: 15f93bd7b0e58cc1ee8c5ff06cb5a085c686ace4
  • Source: FileInfo.java:260-308
game data SHA1 15f93bd7b0e5

changelog.html

release history shown from the Android menu

  • Read whole from the package assets, and shown again through file:///android_asset/. No copy outside the package is consulted.
  • Size: 66.6 KB, SHA1 fbd74bab1bda
Hashes and source
  • SHA1: fbd74bab1bda04cd8ea4d313057813a6916d1cef
  • Source: EMULib.java:1075, EMULib.java:1104
game data SHA1 fbd74bab1bda
.