diff --git a/emulators/bnes.yml b/emulators/bnes.yml new file mode 100644 index 00000000..66761db6 --- /dev/null +++ b/emulators/bnes.yml @@ -0,0 +1,59 @@ +emulator: bnes +type: libretro +source: "https://github.com/libretro/bnes-libretro" +cores: + - bnes +systems: + - nes + +notes: | + bnes is a NES emulator based on byuu's bNES/higan v083 NES module, ported + to libretro by Ryphecha. It is a lightweight, accuracy-focused NES core. + + The core loads cartridge data entirely through retro_load_game with + need_fullpath=false (libretro.cpp:129). ROM data is passed as a memory + buffer and parsed by Cartridge::load (cartridge.cpp:18-31), which detects + iNES headers (16-byte offset) and delegates to Board::load for mapper setup. + + The PPU generates its palette from a hardcoded color table in libretro.cpp + (lines 20-37) with emphasis factor tables. No external palette file is loaded. + + System::init (system.cpp:62-66) only sets up the interface pointer and + default input devices. No system ROM, BIOS, or firmware is loaded at any + stage of initialization or cartridge loading. + + The core does not call RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY and has no + file I/O for BIOS or firmware. FDS (Famicom Disk System) is not supported, + so disksys.rom is not needed. + + No external BIOS or firmware files are needed. + +files: [] + +analysis: + bios_search: + retro_load_game: "libretro.cpp:181-211 - loads cartridge data only, no BIOS" + cartridge_load: "cartridge.cpp:18-31 - parses iNES header + ROM data" + system_init: "system.cpp:62-66 - sets interface pointer, no ROM loading" + system_power: "system.cpp:43-50 - powers subsystems, no file I/O" + interface_init: "interface.cpp:17-20 - stores derived pointer, calls system.init" + supported_mappers: + - NROM + - SxROM (MMC1) + - UxROM + - CNROM + - TxROM (MMC3) + - ExROM (MMC5) + - AxROM + - BnROM + - GxROM + - PxROM (MMC4) + - FxROM (MMC4) + - Bandai FCG + - Konami VRC4 + - Konami VRC6 + - Konami VRC7 + - Sunsoft 5B + fds_support: false + filesystem_access: false + system_directory_used: false diff --git a/emulators/clownmdemu.yml b/emulators/clownmdemu.yml new file mode 100644 index 00000000..579152f4 --- /dev/null +++ b/emulators/clownmdemu.yml @@ -0,0 +1,61 @@ +emulator: ClownMDEmu +type: libretro +source: "https://github.com/libretro/clownmdemu-libretro" +cores: + - clownmdemu +systems: + - sega-megadrive + - sega-megacd + +notes: | + ClownMDEmu is a Sega Mega Drive/Genesis and Mega CD emulator by Clownacy. + Supports cartridge (bin/md/gen) and CD (cue/iso/chd) formats, plus a + subsystem for cartridge+CD combo (Mega CD Mode 1). + + The core has NO external BIOS file requirements. firmware_count = 0 in the + libretro .info file confirms this. + + Mega CD boot ROM: a custom open-source replacement boot ROM is compiled + directly into the binary as a 16384-entry uint16 array + (mega-cd-boot-rom.c included into bus-main-m68k.c:19-21). Source at + https://github.com/Clownacy/clownmdemu-mcd-boot. No external CD BIOS + files (bios_CD_E.bin, bios_CD_U.bin, bios_CD_J.bin) are needed or loaded. + + TMSS (Trademark Security System): not implemented at all. No TMSS ROM is + loaded or checked. The core boots games directly without the "Produced by + or under license from Sega" screen. + + The system directory (RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY) is only used + as a fallback path for Backup RAM (BuRAM) save files, not for BIOS loading. + + CD add-on can be enabled for cartridge games via the "clownmdemu_cd_addon" + core option to allow CD music features, but this uses the built-in boot + ROM, not an external BIOS. + + The core implements its own Mega CD BIOS call handler (MegaCDBIOSCall in + bus-sub-m68k.c) via HLE (high-level emulation) of Sub-CPU BIOS functions + including CDBIOS, CDCTRN, FDRSET, FDRCHG, DRVINIT, CDCSTOP, CDCSTAT, + CDCREAD, and others. + +files: [] + +analysis: + tmss: + supported: false + notes: | + TMSS is not implemented. No ROM loaded, no "Produced by Sega" check. + No references to TMSS exist anywhere in the codebase. + + megacd_bios: + external_required: false + builtin_boot_rom: true + boot_rom_source: "https://github.com/Clownacy/clownmdemu-mcd-boot" + boot_rom_location: "source/mega-cd-boot-rom.c (16384 uint16 entries = 32 KB)" + bus_mapping: "0x400000-0x41FFFF (address & 0x20000 == 0)" + source_ref: "bus-main-m68k.c:19-21, bus-main-m68k.c:484-494" + bios_hle: true + hle_source_ref: "bus-sub-m68k.c:64 (MegaCDBIOSCall)" + notes: | + The Mega CD boot ROM is an open-source replacement compiled into the + binary. Sub-CPU BIOS calls are handled via HLE. No external Sega CD + BIOS files (bios_CD_E/U/J.bin) are needed. diff --git a/emulators/freeintv_ts_overlay.yml b/emulators/freeintv_ts_overlay.yml new file mode 100644 index 00000000..f36d02a0 --- /dev/null +++ b/emulators/freeintv_ts_overlay.yml @@ -0,0 +1,49 @@ +emulator: "FreeIntv (Touchscreen Overlay)" +type: libretro +source: "https://github.com/libretro/FreeIntv" +cores: + - freeintv +systems: + - intellivision + +notes: | + Same repo and core as FreeIntv. The touchscreen overlay feature is a + compile-time option within the same codebase, not a separate core. The + library_name is "freeintv" (src/libretro.c:1413), identical to the + non-overlay build. + + The overlay system adds an onscreen interactive keypad for touchscreen + and mouse input. It is toggled via core option freeintv_multiscreen_overlay + (src/libretro_core_options.h:82-85). When enabled, the display splits into + game + keypad side-by-side (multi-screen mode). + + Visual assets (controller base frame, banner, default keypad image) are + compiled into the binary from C headers: banner.h, keypad_frame_graphic.h, + default_keypad_image.h. These are NOT files the user needs to provide. + + ROM-specific overlays are optional 370x600 PNG files placed by the user in + system/freeintv_overlays/.png. These are cosmetic per-game keypad + images and are not BIOS files. + + BIOS loading is unchanged from the base FreeIntv core. retro_load_game() + (src/libretro.c:1169-1174) loads exec.bin and grom.bin from the system + directory with no variation based on overlay mode. + +bios_identical_to: freeintv + +files: + - name: "exec.bin" + system: intellivision + required: true + size: 8192 + md5: 62e761035cb657903761800f4437b8af + note: "Executive ROM. Same file as base FreeIntv." + source_ref: "src/intv.c:47-71, src/libretro.c:1169" + + - name: "grom.bin" + system: intellivision + required: true + size: 2048 + md5: 0cd5946c6473e42e8e4c2137785e427f + note: "Graphics ROM. Same file as base FreeIntv." + source_ref: "src/intv.c:73-98, src/libretro.c:1173" diff --git a/emulators/gw.yml b/emulators/gw.yml new file mode 100644 index 00000000..7fa4c1ba --- /dev/null +++ b/emulators/gw.yml @@ -0,0 +1,43 @@ +emulator: "Game & Watch" +type: libretro +source: "https://github.com/libretro/gw-libretro" +cores: + - gw +systems: + - handheld-electronic + +notes: | + gw-libretro runs Game & Watch simulators converted from MADrigal's Pascal + source code via pas2lua. Each game is a self-contained .mgw archive (bzip2 + compressed tar v7) containing Lua scripts, sprites, and sound data. + + retro_get_system_info (libretro.c:187-194) sets valid_extensions to "mgw", + need_fullpath to false, and block_extract to false. The core reads content + entirely from the retro_game_info buffer passed by the frontend. + + retro_load_game (libretro.c:256-310) passes the content buffer to + gwrom_init() which decompresses and parses the tar archive in memory. + gwlua_create() then initializes the Lua VM from the archive entries. + + The core never calls RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, never opens + files from the filesystem, and has no firmware or BIOS dependencies. + All game data is bundled in the .mgw content files available from + libretro's buildbot (bot.libretro.com/assets/cores/HandheldElectronicGame/). + + No external BIOS or firmware files are needed. + +files: [] + +analysis: + content_format: + extension: ".mgw" + archive_type: "tar v7 + bzip2" + decompression: "gwrom.c using bundled bzip2 library" + source_ref: "gwrom/gwrom.h:21-27" + game_engine: + language: "Lua (bundled lua 5.3)" + runtime: "gwlua (gwlua/)" + rendering: "retroluxury (retroluxury/)" + resolution: "128x128 base, variable via gwlua_set_fb/gwlua_zoom" + filesystem_access: false + system_directory_used: false diff --git a/emulators/m2000.yml b/emulators/m2000.yml new file mode 100644 index 00000000..141d902e --- /dev/null +++ b/emulators/m2000.yml @@ -0,0 +1,75 @@ +emulator: M2000 +type: libretro +source: "https://github.com/p2000t/M2000" +cores: + - m2000 +systems: + - philips-p2000t + +notes: | + M2000 is a Philips P2000T home computer emulator ported to libretro. + + The libretro port does NOT require any external BIOS or ROM files. + All required ROMs are compiled directly into the core binary via + src/libretro/m2000_roms.h: + + - monitor_rom (4096 bytes) - P2000T monitor ROM, loaded at 0x0000-0x0FFF + - basic_nl_rom (16384 bytes) - Dutch BASIC cartridge ROM, loaded at 0x1000-0x4FFF + + The SAA5050 teletext font is also embedded via src/libretro/m2000_saa5050.h. + + retro_init() at src/libretro/m2000_libretro.c:444 calls: + InitP2000(monitor_rom, basic_nl_rom) + which copies the embedded arrays directly into the ROM memory space + (src/P2000.c:282-283 and 308-311), bypassing all file I/O. + + The standalone (non-libretro) version loads these as external files: + - P2000ROM.bin (monitor ROM, 4096 bytes) + - BASIC.bin (BASIC cartridge ROM, 16384 bytes) + - Default.fnt (SAA5050 font, 2240 bytes) + These files exist in the repo root for the standalone build only. + + The core accepts .cas (cassette) content and can also run with no + content to boot directly into P2000T BASIC. + +files: [] + +platform_details: + bios_mapping: + target: "20K ROM space: 0x0000-0x0FFF monitor, 0x1000-0x4FFF BASIC cartridge" + source_ref: "src/P2000.c:249-311, src/libretro/m2000_libretro.c:444" + notes: | + InitP2000() allocates 20K (0x5000) for ROM and 4K for VRAM. + The monitor ROM occupies the first 4K, the BASIC cartridge ROM + occupies the next 16K. In the libretro build, both are passed + as in-memory byte arrays from the embedded header. + + embedded_roms: + monitor_rom: + source_ref: "src/libretro/m2000_roms.h:1372" + size: 4096 + basic_nl_rom: + source_ref: "src/libretro/m2000_roms.h:1" + size: 16384 + saa5050_fnt: + source_ref: "src/libretro/m2000_saa5050.h:1" + note: "Teletext character generator font, also embedded" + + standalone_files: + note: | + The standalone build (allegro/SDL) loads P2000ROM.bin, BASIC.bin, + and Default.fnt from disk via fopen(). The libretro build skips + this entirely by passing embedded arrays to InitP2000(). + files: + - name: "P2000ROM.bin" + size: 4096 + md5: 2a9c5b22537738b66f4e619734318c15 + sha1: 4dbb28adad30587f2ea536ba116898d459faccac + - name: "BASIC.bin" + size: 16384 + md5: 2191811aa64f8e7f273ce0f462374728 + sha1: fb5100436c99634a2592a10dff867f85bcff7aec + - name: "Default.fnt" + size: 2240 + md5: e06dd73b8a149990f7722eabbe4f286f + sha1: dc3508afcafb38fc33e883b0caf4cf3909998a07 diff --git a/emulators/mesen.yml b/emulators/mesen.yml new file mode 100644 index 00000000..6f9768df --- /dev/null +++ b/emulators/mesen.yml @@ -0,0 +1,91 @@ +emulator: Mesen +type: libretro +source: "https://github.com/libretro/Mesen" +systems: [nintendo-nes, nintendo-fds] + +notes: | + Mesen is a cycle-accurate NES/Famicom emulator (the original, NES-only + version -- not Mesen2 which adds SNES/GB/PCE). NES cartridge games + need no BIOS. Famicom Disk System games require the FDS BIOS ROM. + + The core tries two filenames for the FDS BIOS: FdsBios.bin first, then + disksys.rom as fallback. Both are loaded from the system directory root + (GetHomeFolder = RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY). If neither is + found or the file is not exactly 8192 bytes, FDS games fail to load. + + The Study Box is an obscure Famicom tape-based learning peripheral + (mapper 186). Its BIOS (StudyBox.bin, 256 KB) is loaded the same way. + Only needed for Study Box tape dumps (.stbx format). + + MesenDB.txt (game database for CRC-based ROM identification) is baked + into the core binary as MesenDB.inc. An external file in the system + directory overrides the built-in copy but is never required. + + MesenPalette.pal is an optional custom palette file, loaded only when + the mesen_palette core option is set to Custom. Accepts 192 bytes + (64 colors) or 1536 bytes (512 colors with emphasis combos). Multiple + palettes exist so no canonical hash. + + HdPacks go in system/HdPacks// -- not BIOS files, ignored + here. + + File path construction: Libretro/libretro.cpp retro_init() sets + FolderUtilities::SetHomeFolder(systemFolder). All BIOS lookups use + FolderUtilities::CombinePath(GetHomeFolder(), filename) -- flat, + no subdirectories. + +files: + # --- Famicom Disk System BIOS (required for FDS games) --- + - name: "disksys.rom" + system: nintendo-fds + description: "FDS BIOS ROM" + required: true + size: 8192 + md5: "ca30b50f880eb660a320674ed365ef7a" + sha1: "57fe1bdee955bb48d357e463ccbf129496930b62" + source_ref: "Core/FdsLoader.cpp:45-60 (LoadBios), Core/FdsLoader.cpp:140-146 (LoadRom validates size == 0x2000)" + notes: "Mapped at 0xE000-0xFFFF as PRG ROM bank 0. Core tries FdsBios.bin first, falls back to disksys.rom. CRC32 0x5E607DCF (standard Famicom). Size must be exactly 8192 bytes or BiosMissing is set." + + # --- FDS BIOS alternate filename --- + - name: "FdsBios.bin" + system: nintendo-fds + description: "FDS BIOS ROM (Mesen-preferred filename)" + required: false + size: 8192 + md5: "ca30b50f880eb660a320674ed365ef7a" + sha1: "57fe1bdee955bb48d357e463ccbf129496930b62" + source_ref: "Core/FdsLoader.cpp:50 (primary lookup path)" + notes: "Same file as disksys.rom. Mesen checks this name first. Only one of the two is needed." + + # --- Study Box BIOS (required for Study Box tape content) --- + - name: "StudyBox.bin" + system: nintendo-nes + description: "Famicom Study Box BIOS ROM" + required: false + size: 262144 + md5: ~ + sha1: ~ + source_ref: "Core/StudyBoxLoader.cpp:125-133 (LoadBios), Core/StudyBoxLoader.cpp:146-157 (LoadRom validates size == 0x40000)" + notes: "256 KB BIOS for the Study Box tape peripheral (mapper 186, iNES mapper 65533). Only needed for .stbx tape dumps. Extremely obscure hardware, no widely-known hash." + + # --- Game database (optional, baked-in fallback) --- + - name: "MesenDB.txt" + system: nintendo-nes + description: "Mesen game database for CRC-based ROM identification" + required: false + size: ~ + md5: ~ + sha1: ~ + source_ref: "Core/GameDatabase.cpp:74-81 (InitDatabase), Libretro/MesenDB.inc (baked-in copy)" + notes: "CSV game database keyed by CRC32. Used for mapper, mirroring, input type, and VS System detection. A complete copy is compiled into the binary, so this file is optional. Placing a newer version in the system directory overrides the built-in data." + + # --- Custom palette (optional, core option mesen_palette = Custom) --- + - name: "MesenPalette.pal" + system: nintendo-nes + description: "External NES color palette" + required: false + size: 192 + md5: ~ + sha1: ~ + source_ref: "Libretro/libretro.cpp:301-323 (load_custom_palette)" + notes: "Loaded when mesen_palette core option is Custom. Accepts 192 bytes (64 RGB triplets) or 1536 bytes (512 entries for emphasis combos). Falls back to built-in default palette. Multiple valid palettes exist so no canonical hash." diff --git a/emulators/pd777.yml b/emulators/pd777.yml new file mode 100644 index 00000000..56ffa145 --- /dev/null +++ b/emulators/pd777.yml @@ -0,0 +1,56 @@ +emulator: PD777 +type: libretro +source: "https://github.com/W88DodPECuThLOl/PD777" +cores: + - pd777 +systems: + - epochcv + +notes: | + PD777 is an Epoch Cassette Vision emulator (NEC uPD777C CPU) with a libretro + interface, by W88DodPECuThLOl. + + No BIOS or firmware files required. The .info file declares firmware_count = 0. + + Game loading in source/libretro/libretro.cpp:retro_load_game() (line 386-474). + The core loads a code ROM file (.bin777) directly from the content path, then + attempts to load a pattern ROM file (.ptn777) by replacing the extension. + + If neither file is found, the core falls back to hardcoded ROM data compiled + from source/core/rom.cpp (Battle Vader program + pattern ROM dumps from + oguchi-rd.com). + + The code ROM supports three formats: + - Raw order: exactly 0xF00 bytes, program words in sequential address order + - Raw address: address/data pairs (compiled-in rawRom[] array) + - Formatted: header starting with "_CassetteVision_000" magic, version 0 or 1, + includes key mapping, title, and code section at offset 0x100 + + The pattern ROM supports three formats: + - Formatted: 0x340 bytes, header "*CassetteVision*0000", 7x7 + 8x7 CG patterns + - Raw bitstream: 0x4D0 bytes, bit-packed 7x7 and 8x7 character patterns + - Built-in: fallback to patternRom[] / patternRom8[] arrays in rom.cpp + + The system directory path is retrieved via RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY + but is not used for any file loading. + + Game identification uses a checksum over the loaded ROM to detect known cassettes + (Battle Vader, Galaxian, etc.) and apply per-game key mappings and bent character + tables. 11 cassette IDs are recognized (1-9, 11, 12). + + Supported extensions: zip, bin777, ptn777. + +files: [] + +platform_details: + cpu: "NEC uPD777C (uPD774 variant)" + system: "Epoch Cassette Vision (1981)" + region: "Japan" + notes: | + The Cassette Vision uses a NEC uPD777C (or uPD774 variant) as its main + processor. Program ROM and pattern/character ROM are per-cartridge, not + system-level. There is no system BIOS - the CPU executes directly from + the cartridge ROM. + + The emulator supports analog paddles (4 paddles mapped to 2 analog sticks), + lever switches, push buttons, course switch, and a lightgun peripheral. diff --git a/emulators/play.yml b/emulators/play.yml new file mode 100644 index 00000000..a18c4266 --- /dev/null +++ b/emulators/play.yml @@ -0,0 +1,60 @@ +# Play! emulator BIOS profile +# Generated from source analysis of https://github.com/jpd002/Play- +# Commit analyzed: HEAD as of 2026-03-17 + +emulator: "Play!" +type: libretro +core_name: play_libretro +source: "https://github.com/jpd002/Play-" +systems: [sony-playstation-2] + +bios_directory: null +bios_detection: "hle" +bios_selection: "not_applicable" + +validation: + method: "none" + note: > + Play! is a full HLE (High-Level Emulation) PS2 emulator. It does not load or + require any real PS2 BIOS dump. The LoadBIOS() function in Ee_SubSystem.cpp + (which would read ./vfs/rom0/scph10000.bin) is commented out in PS2VM.cpp:ResetVM(). + +files: [] + # No BIOS files required. + # IOP modules (rom0:SIO2MAN, rom0:PADMAN, rom0:MCMAN, rom0:MCSERV, etc.) + # are all replaced by HLE implementations in Source/iop/IopBios.cpp. + # The EE kernel/OS is reimplemented in Source/ee/PS2OS.cpp. + +virtual_filesystem: + # Play! uses a virtual filesystem for memory cards and disc access, + # but these are runtime directories, not BIOS files. + mc0: {default: "vfs/mc0", purpose: "Memory card slot 0 (save data)"} + mc1: {default: "vfs/mc1", purpose: "Memory card slot 1 (save data)"} + host: {default: "vfs/host", purpose: "Host filesystem access"} + cdrom0: {default: null, purpose: "Disc image (set per-game)"} + +memory_layout: + EE_RAM: {size: "32 MB (0x02000000)"} + EE_BIOS: {size: "4 MB (0x00400000)", note: "Allocated but unused, HLE replaces real BIOS"} + IOP_RAM: {size: "2 MB (0x00200000)"} + SPU_RAM: {size: "2 MB (0x00200000)"} + +notes: | + Play! does not require any PS2 BIOS files. Unlike PCSX2, it uses High-Level + Emulation to reimplement the PS2 kernel, IOP BIOS modules, and system services + entirely in C++. + + Key HLE components: + - EE kernel: Source/ee/PS2OS.cpp (handles BootFromCDROM, BootFromFile, syscalls) + - IOP BIOS: Source/iop/IopBios.cpp (HLE modules for rom0:PADMAN, MCMAN, MCSERV, etc.) + - No rom0/rom1/erom files are loaded at runtime + + The legacy LoadBIOS() function in Source/ee/Ee_SubSystem.cpp references + "./vfs/rom0/scph10000.bin" but this call is commented out in PS2VM::ResetVM() + and has no effect on emulation. + + mc2_ings.ico is not referenced anywhere in Play! source code. That file is + specific to PCSX2's memory card icon handling, not Play!. + + The libretro core supports: .elf, .iso, .cso, .isz, .bin disc images. + Extensions handled in main_libretro.cpp:retro_get_system_info(). diff --git a/emulators/race.yml b/emulators/race.yml new file mode 100644 index 00000000..ecfcbefe --- /dev/null +++ b/emulators/race.yml @@ -0,0 +1,52 @@ +emulator: RACE (Neo Geo Pocket) +type: libretro +source: "https://github.com/libretro/RACE" +systems: [snk-ngp, snk-ngpc] + +notes: | + RACE is a Neo Geo Pocket and Neo Geo Pocket Color emulator, originally + developed for PSP (forked from Akop Karapetyan's port), adapted for + libretro. + + No external BIOS files are required. The core contains dead code in + race-memory.c that would load "NPBIOS.BIN" (64KB, loaded into cpurom + via filestream_open), but it is compiled out with #if 0 and loadBIOS() + unconditionally returns 0. The comment explains: "Using a real bios + file causes nothing but issues" and references Card Fighters' Clash + Test Mode as a known failure. + + Instead, the core uses a software HLE approach: + - A built-in koyote_bin memory dump (RAM state from a real console + post-boot) is copied into mainram at startup + - A fake SWI jump table is constructed at cpurom[0xE000] using the + TLCS-900H 0x1A (reg) dummy opcode to trap BIOS calls + - doBios() in tlcs900h.c handles 33 BIOS functions in software: + shutdown, clock speed, RTC, screen mode, font rendering, flash + read/write, communication, and sound control + - Interrupt vectors are set up at cpurom[0xFF00] and interrupt + handler code at cpurom[0xF800] + - CPU RAM defaults (interrupt priorities, timers) are loaded from + the ngpcpuram[256] table + + The Z80 sound CPU is emulated in software (cz80 or DrZ80 backend). + Flash memory for game saves is handled internally by flash.c. + + The only core option affecting system behavior is ngp_language + (english/japanese), which sets a RAM flag at 0x6F87. + + ROM extensions: .ngp, .ngc, .ngpc, .npc + +files: [] + +analysis: + npbios: + filename: NPBIOS.BIN + size: 65536 # 64 KB (0x10000) + loaded_by: "race-memory.c:loadBIOS()" + status: disabled + source_ref: "race-memory.c:337-361" + notes: | + loadBIOS() is wrapped in #if 0 and always returns 0. + Even if re-enabled, the realBIOSloaded=1 path has known + compatibility issues (e.g. Puzzle Bobble fails to boot). + The HLE path is the only functional code path. diff --git a/emulators/vemulator.yml b/emulators/vemulator.yml new file mode 100644 index 00000000..da0d3783 --- /dev/null +++ b/emulators/vemulator.yml @@ -0,0 +1,72 @@ +emulator: VeMUlator +type: libretro +source: "https://github.com/libretro/vemulator-libretro" +cores: + - vemulator +systems: + - sega-vmu + +notes: | + VeMUlator is a Sega Dreamcast Visual Memory Unit (VMU/VMS) emulator ported + from Android (Java) to C++ for libretro. It emulates the Sanyo LC8670 + "Potato" CPU, 128 KB flash memory, 48x32 monochrome LCD, piezo buzzer, + and basic timer subsystems. + + No BIOS files are required. The core uses High Level Emulation (HLE) to + bypass the VMU firmware entirely: + + - At startup, startCPU() checks the BIOSExists flag (vmu.cpp:195). When + false (always, in the libretro port), it calls initializeHLE() which + sets up SFR registers (SP=0x7F, PSW=0x02, IE=0x80, MCR=0x08, P7=0x02, + OCR=0xA3, BTCR=0x41) and system RAM variables directly (vmu.cpp:206-222). + + - A loadBIOS() function exists in the VMU class (vmu.cpp:82-137) and can + handle both encrypted (XOR 0x37, 4-byte header stripped) and unencrypted + BIOS images (first byte must be 0x2A = JMPF opcode). Maximum accepted + size is 0xF004 (61444) bytes, loaded into 0xF000 (61440) bytes of ROM. + However, this function is never called by the libretro frontend code. + retro_load_game() in main.cpp only loads game flash data, with no BIOS + path resolution or RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY call. + + - The README lists "BIOS support" as a planned future feature. + + The .info file declares no firmware entries (firmware_count absent). + Supported ROM formats: VMS (.vms), DCI (.dci), raw flash dump (.bin). + The core option "enable_flash_write" allows persistent saves for .bin files. + +files: [] + +platform_details: + hle_implementation: + source_ref: "vmu.cpp:195-222" + sfr_init: + SP: "0x7F" + PSW: "0x02" + IE: "0x80" + MCR: "0x08" + P7: "0x02" + OCR: "0xA3" + BTCR: "0x41" + ram_init: + - "0x31 = 0xFF (battery level)" + - "0x6E = 0xFF" + - "P3 = 0xFF (no buttons pressed)" + - "BCD date/time at 0x10-0x16, raw at 0x17-0x1D" + notes: | + HLE skips the BIOS boot sequence and jumps directly into the loaded + game. System clock, date, and button state are initialized in RAM. + The EXT register is set to 1 to signal HLE mode to the CPU + (vmu.cpp:198-199). Games that depend on BIOS-initialized state + beyond what HLE provides may not work correctly. + + unused_bios_loader: + source_ref: "vmu.cpp:82-137" + max_file_size: 61444 + rom_load_size: 61440 + encryption: "XOR 0x37 after stripping 4-byte header" + detection: "first byte 0x2A (JMPF) = unencrypted, otherwise encrypted" + notes: | + The loadBIOS() method is fully implemented but unreachable from the + libretro interface. No system directory query, no BIOS path construction, + and no call site exists in main.cpp. A future update could wire this up + to support real VMU firmware boot (file manager, clock, mini-games menu).