Files
libretro/emulators/bbkemu.yml
T

139 lines
6.7 KiB
YAML

emulator: BBKEmu
type: standalone + libretro
core_classification: pure_libretro
source: "https://github.com/AloysHF/BBKEmu"
upstream: "https://github.com/AloysHF/BBKEmu"
profiled_date: "2026-10-26"
source_commit: "0b698480d93b1bbf0717c658d89b551559a2ae3f"
core_version: "0.1.0"
version_basis:
kind: file
path: "Cargo.toml"
pattern: 'version\s+=\s+"([^"]+)'
display_name: "BBK - Electronic Dictionary (BBKEmu)"
cores:
- bbkemu
systems:
- bbk-longman-4980
- bbk-longman-4988
notes: |
BBK A-series electronic dictionary game emulator written in Rust by
AloysHF. The libretro core and the bbk-emu standalone binary share the
bbkemu-core crate. A .gam game is 6502 code that calls into the
dictionary's OS ROM for LCD, keyboard, audio, timer and file services.
Two ROM images are read per model from a fixed layout below the system
directory: bbkemu/<model>/8.BIN, the font ROM mapped at physical
0x800000-0x9FFFFF, and bbkemu/<model>/E.BIN, the OS ROM mapped at
0xE00000-0xFFFFFF. The model folder is a4980 or a4988. Every component
is matched byte for byte against the directory entries, so 8.bin, e.bin
or BBKEmu/ are not found, on Windows as well
(crates/bbkemu-core/src/firmware.rs:25-29,
crates/bbkemu-core/src/firmware.rs:38-53,
crates/bbkemu-core/src/memory.rs:377-398). firmware::load reads both
files and fails naming every missing one, and the libretro core then
refuses the content with that message
(crates/bbkemu-core/src/firmware.rs:56-95,
crates/bbkemu-libretro/src/lib.rs:415-427,
crates/bbkemu-libretro/src/lib.rs:807-834). Each image is copied into a
2 MiB zero-filled buffer (crates/bbkemu-core/src/memory.rs:196-209), and
nothing checks its size or contents.
The libretro core reads the system directory from the frontend
(crates/bbkemu-libretro/src/lib.rs:233-246) and the model from the
bbkemu_model core option, a4980 by default
(crates/bbkemu-libretro/src/lib.rs:207-208,
crates/bbkemu-libretro/src/lib.rs:430-434). The Emscripten build used by
EmulatorJS takes the root of its virtual filesystem, where the firmware
archive is extracted, and picks the model from the only
bbkemu/<model>/ folder found there
(crates/bbkemu-libretro/src/lib.rs:403-412,
crates/bbkemu-libretro/src/lib.rs:442-479).
The standalone binary reads the same layout below --system-dir, system
relative to the working directory by default, with --model a4980
(default) or a4988 (crates/bbkemu/src/main.rs:31-33,
crates/bbkemu/src/main.rs:43-45, crates/bbkemu/src/main.rs:135-139).
The A4988 model differs by its flash save-area offset and key layout
(crates/bbkemu-core/src/emulator.rs:148-153,
crates/bbkemu-libretro/src/lib.rs:991-1001).
During init the OS maps its own bank at logical bank D: 0xEA8 for the
A4980 OS, 0xE88 for the A4988 OS (crates/bbkemu-core/src/model.rs:14-16).
The core never reads that value back: detect_model
(crates/bbkemu-core/src/model.rs:51-63) has no caller. The
include_bytes! font in crates/bbkemu-core/src/font.rs is not declared in
lib.rs and is not compiled. Content is read from its path
(need_fullpath = true, crates/bbkemu-libretro/src/lib.rs:732,
crates/bbkemu-libretro/src/lib.rs:485-490). Save RAM is the first
0x14000 bytes of the emulated flash
(crates/bbkemu-libretro/src/lib.rs:1277-1278).
files:
- name: 8.BIN
path: bbkemu/a4980/8.BIN
standalone_path: system/bbkemu/a4980/8.BIN
system: bbk-longman-4980
size: 2097152
required: true
description: "BBK A-series font ROM, A4980"
note: >-
Read whole from {system}/bbkemu/a4980/8.BIN, name matched exactly, into
the 2 MiB window at physical 0x800000. Without it the content is
refused with a missing firmware message. No size or hash check. Size
is the window the image fills.
source_ref: "crates/bbkemu-core/src/firmware.rs:25-29, crates/bbkemu-core/src/firmware.rs:56-95, crates/bbkemu-core/src/memory.rs:8, crates/bbkemu-core/src/memory.rs:196-201, crates/bbkemu-core/src/memory.rs:384-390, crates/bbkemu-libretro/src/lib.rs:415-427, crates/bbkemu/src/main.rs:135-139"
- name: E.BIN
path: bbkemu/a4980/E.BIN
standalone_path: system/bbkemu/a4980/E.BIN
system: bbk-longman-4980
size: 2097152
required: true
description: "BBK A-series OS ROM, A4980"
note: >-
Read whole from {system}/bbkemu/a4980/E.BIN, name matched exactly, into
the 2 MiB window at physical 0xE00000. The last 256 bytes also serve
as the interrupt vector page at 0x0300. Without it the content is
refused with a missing firmware message. No size or hash check. Size
is the window the image fills.
source_ref: "crates/bbkemu-core/src/firmware.rs:25-29, crates/bbkemu-core/src/firmware.rs:56-95, crates/bbkemu-core/src/memory.rs:9, crates/bbkemu-core/src/memory.rs:204-209, crates/bbkemu-core/src/memory.rs:224-226, crates/bbkemu-core/src/memory.rs:391-397, crates/bbkemu-core/src/emulator.rs:231-252, crates/bbkemu-libretro/src/lib.rs:415-427, crates/bbkemu/src/main.rs:135-139"
- name: 8.BIN
path: bbkemu/a4988/8.BIN
standalone_path: system/bbkemu/a4988/8.BIN
system: bbk-longman-4988
size: 2097152
required: true
description: "BBK A-series font ROM, A4988"
note: >-
Read from {system}/bbkemu/a4988/8.BIN when the bbkemu_model core
option or --model selects a4988, or when it is the only model folder
in an EmulatorJS firmware archive. Without it that model refuses the
content.
source_ref: "crates/bbkemu-core/src/firmware.rs:48-53, crates/bbkemu-core/src/model.rs:42-48, crates/bbkemu-libretro/src/lib.rs:207-208, crates/bbkemu-libretro/src/lib.rs:430-434, crates/bbkemu-libretro/src/lib.rs:442-479, crates/bbkemu/src/main.rs:43-45"
- name: E.BIN
path: bbkemu/a4988/E.BIN
standalone_path: system/bbkemu/a4988/E.BIN
system: bbk-longman-4988
size: 2097152
required: true
description: "BBK A-series OS ROM, A4988"
note: >-
Read from {system}/bbkemu/a4988/E.BIN when the bbkemu_model core
option or --model selects a4988, or when it is the only model folder
in an EmulatorJS firmware archive. Without it that model refuses the
content.
source_ref: "crates/bbkemu-core/src/firmware.rs:48-53, crates/bbkemu-core/src/model.rs:42-48, crates/bbkemu-libretro/src/lib.rs:207-208, crates/bbkemu-libretro/src/lib.rs:430-434, crates/bbkemu-libretro/src/lib.rs:442-479, crates/bbkemu-core/src/emulator.rs:148-153"
platform_details:
memory_map:
source_ref: "crates/bbkemu-core/src/memory.rs:377-398"
note: |
Physical space seen through sixteen 4 KiB bank registers: RAM below
0x8000, 2 MiB flash at 0x200000, 8.BIN at 0x800000, E.BIN at
0xE00000. Reads outside a loaded image return 0x00, and ROM windows
ignore writes.