Nesoid
Nesoid emulates Nintendo NES and Nintendo Famicom Disk System. It reads 3 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
Android package com.androidemu.nes, launched on the path of the content with
android.intent.action.VIEW, and the activity declares the file scheme with the
application/zip and application/octet-stream types
(app/). Two build families answer to that
package id. Yongzh's own closed builds come first, and 2.3 (versionCode 56)
and 2.5.0 (versionCode 62) are read here, both carrying his certificate sha256
744b1df1b3610d58e447d243521a0957cc5f4ebd50b12d2816a92396d1aa32f2 (C=CN,
O=androidemu.com, freeman.yong@gmail.com). He later published the sources. The
SourceForge project carried them on and Yaroslav Pronin forked that tree to
GitHub, where release 2.5-4 (versionName 2.5, versionCode 61, armeabi-v7a,
certificate O=Free Software CN=Yaroslav Pronin) is the build ES-DE names. The
SourceForge community rebuild of the same tree (com.androidemu.nes_61.apk,
certificate O=Alcatraz CN=Birdman) was read beside it. Line numbers are the
fork's, native addresses are the armeabi library of Yongzh's 2.5.0, and the
SourceForge tree carries general.c and fds.c byte identical to the fork.
The emulation core is neslib, FCE Ultra 0.98 reached through the GP2X port
GPFCE, whose driver and blitters still sit in the tree unbuilt
(app/jni/neslib/drivers/gp2x/, giz_blit.s). The Android build compiles the
mapper, board and input sets with its own four file driver
(app/), leaves netplay out of the library and
runs it from Java instead (app/jni/neslib/fce.c:1081,1206,
app/,28), and reduces
FCEUD_PrintError and FCEUD_Message to empty bodies, so every message the core
raises is discarded (app/).
The activity accepts a name ending .nes, .fds or .zip caselessly and refuses
anything else before the loader runs (app/,
app/). An archive is opened by the core,
which keeps the first entry ending .nes, .fds, .nsf, .unf, .nez or .unif, and
a plain file also opens gzipped (app/jni/neslib/file.c:192-232,250-273).
FCEUI_LoadGame then tries the iNES, NSF, FDS and UNIF loaders in that order on
the bytes themselves (app/jni/neslib/fce.c:1180-1187).
The Disk System BIOS is the file the user has to supply. FDSLoad asks
FCEU_MakeFName for it, opens it with a plain fopen and reads 8192 bytes into
the array mapped over 0xE000 to 0xFFFF (app/jni/neslib/fds.c:76,146,160,
808-843, app/). Where that name resolves
is the one place the two build families differ. Yongzh's builds carry a
setOption entry fdsRom that duplicates the path the settings screen holds and
return it from FCEU_MakeFName when set (libnes.so setOption 0x455a4-0x45694,
setter 0x8804-0x8848, FCEUMKF_FDSROM case 0x8094-0x80ac,
Nesoid 2.5.0 EmulatorActivity.java:834). The published sources carry neither
the option nor that branch, so only the fallback remains: FCEUMKF_FDSROM
formats disksys.rom under the base directory, and nothing on Android ever
calls FCEUI_SetBaseDirectory, which leaves that buffer empty
(app/jni/neslib/general.c:46,52-56,215). The settings screen still writes the
fdsRom preference and still shows the chosen path, but no code reads it back
(app/,150-156,195-210,
app/). Disk switching went the same
way: the menu asks the engine for fdsTotalSides and fdsCurrentDisk, which
Yongzh's builds answer and the fork's does not, the base class returning zero
for any name (app/,969,1244-1249,
app/jni/common/emuengine.h:49).
The Game Genie ROM is a second path the user picks, kept across both families.
loadGameGenie passes it to the engine only while the Enable Game Genie switch
is on, the setter duplicates it into FSettings.GameGenie and OpenGenie reads it
once the content has loaded (app/,
app/,
app/jni/neslib/svga.c:132-140, app/jni/neslib/fce.c:1201-1203). Both pickers
list names ending .nes, .rom or .bin
(app/, app/).
A palette named after the content is read from the pal directory of the same
unset base directory as the disk BIOS, 192 bytes taken as 64 RGB triples. A
missing file leaves the built-in table in place
(app/, app/,
app/jni/neslib/fce.c:1212).
Per content the emulator writes and reads back its own files, all under that
same base directory: sav/<name>.sav for battery backed cartridge RAM
(app/jni/neslib/cart.c:641-700), sav/<name>.fds for the modified disk
(app/jni/neslib/fds.c:845-870,915-930), fcs/<name>.fc<n> states,
snaps/ screenshots and movie/<name>.fcm recordings
(app/,222-238), and cheats/<name>.cht, which
FCEU_LoadGameCheats reads at load and FCEU_FlushGameCheats rewrites at close
(app/jni/neslib/cheat.c:183-208,272-300, app/jni/neslib/fce.c:1080,1213).
The application writes its own files through Java paths instead: state slots
at <content>.ss<n> beside the content (app/,135-140),
an XML cheat list at <content>.cht, also beside the content
(app/,105-160), key profiles under its data directory
(app/,92-100), PNG screenshots under screenshot/ on
external storage (app/) and a netplay state
exchanged through its cache directory (app/).
3 files: 1 required, 2 optional.
By kind: 2 BIOS and 1 game data.
In this collection: 2 in repo, 0 missing and 1 unsourceable.
Required
Section titled “Required”disksys.rom required for Nintendo Famicom Disk System in repo
Famicom Disk System BIOS
- System: Nintendo Famicom Disk System
- Read as 8192 bytes into the 8 KB array mapped over 0xE000 to 0xFFFF. A failed open or a short read frees the disk data and ends the load, so no .fds content runs. Both messages are discarded and the application reports only that the ROM failed to load. Nothing else about the image is examined, so a longer file passes on its first 8192 bytes and no hash is compared. The open is a plain fopen, so neither a zipped nor a gzipped copy answers. Yongzh's builds take the path from the fdsRom setting, whose picker lists names ending .nes, .rom or .bin, while the builds made from the published sources ignore that setting and resolve the compiled name under a base directory that is never set, which puts it at the root of the filesystem.
- Size: min 8.0 KB (8,192 bytes)
- Collection copy:
bios/Arcade/FBNeo/fdsbios.nes - Platforms:
disksys.rom: Batocera, EmuDeck, KNULLI, Lakka, RetroArch, RetroBat, RetroPie.bios/disksys.rom: AmberELEC, EmuELEC, RetroDECK.fds/disksys.rom: Recalbox, RomM.FDS_disksys-nintendo.rom: BizHawk.NES/boot0.rom: MiSTer FPGA
Validation, source and config key
- Validation: size
- Source:
app/jni/neslib/fds.c:808-843(open, read, failure),app/jni/neslib/fds.c:76,app/jni/neslib/fds.c:146,app/jni/neslib/fds.c:160(array and mapping),app/jni/neslib/general.c:46,app/jni/neslib/general.c:52-56,app/jni/neslib/general.c:215(name and empty base directory),app/(plain fopen), offsetjni/ neslib/ drivers/ android/ file.c:3-6 0x455a4-0x45694inNesoid 2.5.0 libnes.so(setOption fdsRom), offset0x8804-0x8848inNesoid 2.5.0 libnes.so(setter), offset0x8094-0x80acinNesoid 2.5.0 libnes.so(FCEUMKF_FDSROM returns the set path),Nesoid 2.5.0 EmulatorActivity.java:834
- Config key:
fdsRom
Optional
Section titled “Optional”gg.rom optional in repo
Game Genie add-on cartridge ROM
- System: Nintendo NES
- Read only while the Enable Game Genie switch is on and a path is set, through a picker listing names ending .nes, .rom or .bin. The first 16 bytes decide the format: a leading 0x4E is taken as an iNES image, from which 4096 bytes of program ROM are read, then 256 bytes of character ROM 16 KB further in, so such a file needs at least 16656 bytes. Anything else is read as a raw 4352 byte image. A failed open or a short read leaves the Game Genie off and the content still runs. No hash is compared.
- Size: min 4.2 KB (4,352 bytes)
- Collection copy:
bios/Other/mednafen/gg.rom
Validation, source and config key
- Validation: size
- Source:
app/jni/neslib/cart.c:475-521(open and format branch),app/jni/neslib/svga.c:132-140(setter),app/,jni/ neslib/ drivers/ android/ nesengine.cpp:242-243 app/jni/neslib/fce.c:1201-1203(call site),app/,src/ main/ java/ com/ androidemu/ nes/ EmulatorActivity.java:870-874 app/(picker)src/ main/ java/ com/ androidemu/ nes/ EmulatorSettingsFragment.java:179-193
- Config key:
gameGenieRom
Game data
Section titled “Game data”<game>.pal optional unsourceable game data
colour palette for one title
- System: Nintendo NES
- Opened as pal/<name>.pal under the base directory when content loads, with the name taken from the content. 192 bytes are read as 64 RGB triples and replace the built-in table, without checking how many arrived, so a shorter file leaves the remaining entries unset, and a missing file changes nothing. The base directory is never set on Android, so the name resolves at the root of the filesystem.
- Not collected yet: any 64 colour palette the user picks for one title (files not collected yet)
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