iNES
iNES emulates Nintendo NES and Nintendo Famicom Disk System. It reads 17 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
Technical notes
NES and Famicom emulator by Marat Fayzullin, covering cartridges, the Famicom Disk System and the VS System. The build read here is the free Google Play package com.fms.ines.free, the package ES-DE launches, versionName 6.1.12 versionCode 6112, taken as the Play app bundle drop, xapk sha256 cddeedef6440eda7f18a389a7a5ea67e33fb8be21593aab93ab6b0fe10992496, base apk sha256 17577eced1829e0fe60ac128d94683d4bc1988c3ac627208e7de0e1e49a9abd8, native split config.armeabi_v7a sha256 c7076c05aca28e38d0343fbea4c1b904e6d197e7d8fcbdc4e29c0278fef0f0db. Both splits are signed by the author's own key, CN=Marat Fayzullin O=Garage Research issued 2011, fingerprint d09469e9b550cbc9005d3bd089f3df5f0ba89cba71cdd3b33736a0382d6f9848, as the v1 META-INF/BNDLTOOL.RSA and as the v2 and v3 signer, beside a Play distribution source stamp. The author's site still serves 6.1.4 as iNES-Android-6104.apk under package com.fms.ines, signed by the same key, and Google Play also carries the emulator inside VGBAnext as com.fms.ng, the author recording that Play removed the original com.fms.ines listing over its built-in cheats. The drop carries one native split, armeabi-v7a, whose libmain.so keeps its dynamic symbol table, so the readings below cite Thumb-2 offsets in that slice and Java lines in a jadx 1.5.6 decompile of the base apk. The free iNES 6.1 builds for Windows and Ubuntu were read beside it and open the same files under the same names. No source has ever been published: the author releases ColEm and fMSX as source archives, while every iNES download on the same site, from 0.7 for AIX and SunOS through 6.1, is a binary package. ref: com.fms.ines.free.apk META-INF/BNDLTOOL.RSA, APK Signing Block, https://fms.komkon.org/iNES/, iNES61-Windows-bin.zip, iNES61-Ubuntu-x86-bin.tgz
One directory holds everything the emulator reads. MainActivity hands EMULib.m to jniStart, which copies it into the buffer GetHomeDir returns and passes that same buffer to SetPrivateDir. Every open goes through mopen, which calls OpenRealFile: the name is tried as given and again as <PrivateDir>/<basename>, and when both open the larger of the two is kept. That directory is <ExternalStorage> joined with the application label up to its first whitespace, so iNES, falling back to getExternalFilesDirs(null) when the path is not a writable directory. mopen layers gzdopen over the result, so any of these files also opens gzipped, and a content:// name is routed to the Android storage framework instead. ref: MainActivity.java:1092-1105, EMULib.java:178, 315-361, 363-373, libmain.so jniStart 0x178b4-0x178f6, GetHomeDir 0x15490, libmain.so OpenRealFile 0x2fc94-0x2fdf3, libmain.so mopen 0x2fdf4-0x2fed7
DISKSYS.ROM is the only filename compiled into the emulator. LoadFDS reads the disk image first, taking a bare NINTENDO-HVC header or the 16 byte FDS wrapper ahead of it, then opens DISKSYS.ROM and reads 0x2000 bytes into RAM at 0xE000. A failed open leaves the status at NOT FOUND and a short read at FAILED, and either makes LoadFDS return zero, so the disk never starts. Nothing about the image is checked past the length of that read. Cartridge titles never reach this path. ref: libmain.so LoadFDS 0x3a188-0x3a523, open 0x3a414-0x3a41c, read 0x3a438-0x3a45a, status 0x3a2a0-0x3a2ae, iNES61-Ubuntu-x86-bin ines 0x38165-0x381a9
The startup palette is <HomeDir>/iNES.pal, assembled in Application from GetHomeDir and held in PalName, which StartNES loads when it is set. LoadPAL reads the first 256 bytes: exactly 192 is taken as 64 RGB triples fed to SetColor one at a time, anything else is parsed as text. A missing file leaves the built-in palette in place. The desktop distribution ships twenty candidates under Palettes/ to copy into that single name, the Android package none. ref: libmain.so Application 0x3818c-0x381b0, StartNES 0x38d9a-0x38da6, LoadPAL 0x38f6c-0x391f3 (read 0x38f94-0x38f9e, length 0x38faa), iNES61-Windows-bin.zip Palettes/
LoadNES derives five companion names from the ROM path through MakeFileName: .sav, .ips, .cht, .pal and .sta. Started with no ROM name at all, Application substitutes CART.NES. ref: libmain.so LoadNES 0x39f5e, 0x39ff4, 0x3a05e, 0x3a094, 0x3a0ac, libmain.so Application 0x38278-0x38286
Two package resources are read at runtime. assets/memfs.mp3 is passed whole to jniStart and mounted as an in-memory filesystem carrying one entry, CART.NES. assets/names.dat fills the title lookup and is then extended by <HomeDir>/names.dat, whose entries win on collision. The cheat browser asks the package assets for ROOT.chts first, and this build ships none, so Cheatopedia looks for it in the home directory and its subdirectories, then unpacks iNES-Cheats.zip from the Downloads directory into <HomeDir>/Cheats. A set that ROOT.chts names by a relative path is read from the directory where ROOT.chts was found, and a File= path starting with /sdcard/ has that prefix replaced by the home directory. The author publishes no iNES-Cheats.zip. The 6.1.4 package carried ROOT.chts and seven sets in its assets, and those are the files listed below. ref: MainActivity.java:1092-1105, libmain.so jniStart 0x17684-0x176a2, bi.java:183-213, Cheatopedia.java:195-202, 270-300, 335-344, 477, CheatHelper.java:16-49, iNES-Android-6104.apk assets/
17 files: 1 required, 16 optional. 2 more files come with the app.
By kind: 2 BIOS and 17 game data.
In this collection: 10 in repo, 0 missing and 7 unsourceable.
Required
Section titled “Required”| File | Status |
|---|---|
DISKSYS.ROMFamicom Disk System BIOS
Validation and source
|
required for Nintendo Famicom Disk System in repo |
Optional
Section titled “Optional”| File | Status |
|---|---|
iNES.palstartup colour palette
Source
|
unsourceable |
Game data
Section titled “Game data”| File | Status | Hash |
|---|---|---|
ROOT.chtscheat database read by the Cheatopedia browser
Hashes and source
|
optional in repo game data | MD5 f8a3b82f8731 |
battle-toads.chtscheat set reached from ROOT.chts
Hashes and source
|
optional in repo game data | MD5 579c461a0060 |
dragon-warrior.chtscheat set reached from ROOT.chts
Hashes and source
|
optional in repo game data | MD5 9dcd487b3c3c |
dragon-warrior-2.chtscheat set reached from ROOT.chts
Hashes and source
|
optional in repo game data | MD5 3231f15a1434 |
fceu.chtscheat set reached from ROOT.chts
Hashes and source
|
optional in repo game data | MD5 80ba1e0d24df |
final-fantasy-2.chtscheat set reached from ROOT.chts
Hashes and source
|
optional in repo game data | MD5 9f5604c53f5e |
final-fantasy-3.chtscheat set reached from ROOT.chts
Hashes and source
|
optional in repo game data | MD5 d5e68a35ac2d |
super-mario-brothers.chtscheat set reached from ROOT.chts
Hashes and source
|
optional in repo game data | MD5 51beb6f9722b |
custom.chtsuser cheat sets added to the Cheatopedia menu
Source
|
optional unsourceable game data | - |
Controls.pngvirtual joystick skin
Hashes and source
|
optional in repo game data | MD5 d10635cb6f10 |
Backdrop.pngbackdrop drawn around the emulated screen
Source
|
optional unsourceable game data | - |
<game>.back.pngbackdrop for one title
Source
|
optional unsourceable game data | - |
<game>.ipsIPS patch applied to the loaded ROM
Source
|
optional unsourceable game data | - |
<game>.chtcheat codes for one title
Source
|
optional unsourceable game data | - |
<game>.palcolour palette for one title
Source
|
optional unsourceable game data | - |
Comes with the app
Section titled “Comes with the app”| File | Status | Hash |
|---|---|---|
CART.NESsample ROM image started when no game is given
Hashes and source
|
game data | MD5 c1db31a2aa8a |
names.dattitle database keyed by system and CRC32
Hashes and source
|
game data | SHA1 bb1a86caeb1b |
Next steps
Section titled “Next steps”- Get the files, for the setup in use
- Every system, and the files each one needs
- When a game does not start