Linkboy
Linkboy emulates Nintendo Game Boy, Nintendo Game Boy Color, Nintendo Game Boy Advance and Nintendo Super Game Boy. It reads 3 files, none of them required: it starts games without them.
About this profile
Technical notes
Android package com.pixelrespawn.linkboy, closed source, free on Google Play with a paid unlock, reached by ES-DE through its LINKBOY find rule. Four Play distribution builds are read here, 4.0.0 (versionCode 95, minSdk 26, targetSdk 37, xapk sha256 9a10e00c6dcd2fdc66490000bf77bfa9846b37dffd31f8d96dc89d7c5997fee1), 3.11.4 (versionCode 93, minSdk 32, targetSdk 36, xapk sha256 4432cf9ab8ce2d148e8a0e89c26b786e4e7d060f43885d062f6d446b03ca4d32), 3.11.0 (versionCode 86, minSdk 26, xapk sha256 83b92276d28d71e491ebcbec3fa85cef42ef49d8ee0c6fd1bbe0045bc118f866) and 1.4.2 (versionCode 12), all carrying the app signing certificate sha256 feb643cfdd9c49f58eb325fde3d869cefcf59e45dfadb8e540beca35a7b1c28e and the Play distribution source stamp. Emulation lives in liblinkboy.so behind a JNI bridge. Addresses below are armeabi-v7a of 4.0.0 (liblinkboy.so sha256 86334694df475bfba4ec312ef69ca71e45dfda65e51eb074660ca177d80c88f3) and class names are those of its obfuscated dex.
Four subsystems are declared: GBA, GBC, GB and SGB (rd0.java:16-21). An SGB cartridge runs in GB mode when prefer-sgb is off (y72.java:43, i71.java:203-205, 285-287).
The three firmware images are the only files the emulator reads that it does not write itself. One table holds their names, sizes and md5 sums (uq.java:8), and the firmware screen reports each as present, mismatched or absent by comparing the size and then the md5 of the whole file (tq.java:22-85, t32.java:197-204). Importing a slot from that screen writes firmware/ and the name: a picked zip gives its first entry whose length equals the slot size, any other document is copied when its own length does (h.java:127-145, oq.java:58-167). Saves, cheats, thumbnails, keymaps and the ips, ups and bps patches picked up next to a ROM are written or supplied per game, not fixed files.
An image is read only while the use-bios preference is on, which is off until set (y72.java:44, tf5.java:186-194, i71.java:207,289, b71.java:233). The loader appends /firmware/ and the name to the directory handed to setDataDir, the app's external files directory or its internal one when none is mounted (i71.java:74, qm3.java:32-41), and opens the result with fopen "rb". A file whose length is not exactly the expected size is closed and treated as absent, as is a short read. On success the loader returns the crc32 of the bytes (liblinkboy.so 0x1cb10-0x1cd1c, crc32 at 0x1c76c).
A missing image stops nothing. The GBA path copies a 236 byte replacement bios compiled into the library over the 16 KB region and zero fills the remainder. Since 3.11.4 a second variant of that replacement is taken when the game code is B4GJ or B4SJ (0x10a22c-0x10a2c8). The GB and GBC path hands the reset routine a boot rom present flag, false when no image was loaded, and the machine starts from its post boot state (0x14f9b4-0x14fa38, 0x14fab8-0x14fad4).
Since 3.11.4 a loaded GBA image is not run for every cartridge. When the ROM is at least 0xa0 bytes the crc32 of the 156 header bytes from offset 4 is compared with a fixed value, and a mismatch logs "Invalid logo, skipping BIOS" and resets with the boot flag false. The image stays installed and the machine starts from its post boot state (0x10a2ec-0x10a364).
Save states record the crc32 of the image they were made under. Loading a state whose value differs from the running machine re-reads the file and refuses the state when the crc32 still disagrees (0x10aecc-0x10af24, 0x1501b0-0x1501bc, 0x150280-0x1502e4).
3 files: 0 required, 3 optional. 3 have an HLE fallback.
In this collection: 3 in repo and 0 missing.
Optional
Section titled “Optional”gba_bios.bin optional in repo HLE fallback
Game Boy Advance BIOS
- Path:
firmware/gba_bios.bin - System: Nintendo Game Boy Advance
- Read into the 16 KB bios region when use-bios is on. Absent, mismatched in size or short, the region is filled with a replacement bios compiled into the library and zero padded. A cartridge whose header logo fails the crc32 test boots past it.
- Size: 16.0 KB (16,384 bytes), MD5 a860e8c0b6d5
- Collection copy:
bios/Nintendo/ Game Boy Advance/ GBA_bios.rom - Platforms:
gba_bios.bin: Batocera, KNULLI, Lakka, RetroArch, RetroBat, RetroPie, ROCKNIX.bios/gba_bios.bin: AmberELEC, EmuELEC, RetroDECK.gba/gba_bios.bin: Recalbox, RomM.GBA/boot.rom: MiSTer FPGA.GBA_bios.rom: BizHawk
Hashes, validation, source and more
- MD5:
a860e8c0b6d573d191e4ec7db1b1e4f6 - Validation: size, md5
- Source:
Linkboy 4.0.0 uq.java:8,tq.java:22-85, offset0x10a22c-0x10a2c8inliblinkboy.so(size argument 0x4000 at 0x10a260), offset0x10a2ec-0x10a364inliblinkboy.so(logo test), offset0x1cb10-0x1cd1cinloader
- Config key:
use-bios
gbc_bios.bin optional in repo HLE fallback
Game Boy Color boot ROM
- Path:
firmware/gbc_bios.bin - System: Nintendo Game Boy Color
- Read when use-bios is on and the machine is a Game Boy Color. Without it the reset routine receives a false boot rom flag and the machine starts from its post boot state.
- Size: 2.2 KB (2,304 bytes), MD5 dbfce9db9dea
- Collection copy:
bios/Nintendo/ Game Boy Color/ GBC_cgb.bin - Platforms:
gbc_bios.bin: Batocera, KNULLI, RetroBat, ROCKNIX.bios/gbc_bios.bin: AmberELEC, EmuELEC, RetroDECK.cgb_bios.binandcgb_boot.binandgbc_bios.bin: Lakka, RetroArch, RetroPie.GAMEBOY/boot1.rom: MiSTer FPGA.GBC_cgb.bin: BizHawk.gbc/cgb_boot.binandgbc/gbc_bios.bin: RomM.gbc/gbc_bios.bin: Recalbox
Hashes, validation, source and more
- MD5:
dbfce9db9deaa2567f6a84fde55f9680 - Validation: size, md5
- Source:
Linkboy 4.0.0 uq.java:8,tq.java:22-85, offset0x14fa20-0x14fa2cinliblinkboy.so(size argument 0x900), offset0x14fab8-0x14fad4inliblinkboy.so, offset0x1cb10-0x1cd1cinloader
- Config key:
use-bios
gb_bios.bin optional in repo HLE fallback
Game Boy boot ROM
- Path:
firmware/gb_bios.bin - System: Nintendo Game Boy
- Read when use-bios is on and the machine is a Game Boy. Without it the reset routine receives a false boot rom flag and the machine starts from its post boot state.
- Size: 256 B, MD5 32fbbd84168d
- Collection copy:
bios/Nintendo/ Game Boy/ GB_dmg.bin - Platforms:
gb_bios.bin: Batocera, KNULLI, RetroBat, ROCKNIX.bios/gb_bios.bin: AmberELEC, EmuELEC, RetroDECK.dmg_boot.binanddmg_rom.binandgb_bios.bin: Lakka, RetroArch, RetroPie.GB_dmg.bin: BizHawk.gb/dmg_boot.binandgb/gb_bios.bin: RomM.gb/gb_bios.bin: Recalbox
Hashes, validation, source and more
- MD5:
32fbbd84168d3482956eb3c5051637f5 - Validation: size, md5
- Source:
Linkboy 4.0.0 uq.java:8,tq.java:22-85, offset0x14fa0c-0x14fa18inliblinkboy.so(size argument 0x100), offset0x14fab8-0x14fad4inliblinkboy.so, offset0x1cb10-0x1cd1cinloader
- Config key:
use-bios
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