feat: virtualjaguar reads BIOS files now, so declare them

The profile said "No external BIOS files are required or loaded by this
core" and carried an empty file list. The core reads up to eleven names
from the system directory today.

Staging left retro_load_game for stage_cart_boot_rom, which tries a file
before the embedded array. BT_CUSTOM, a value the enum did not carry
when this was profiled, searches six cart boot ROM names across three
directories; BT_M_SERIES tries jagboot_m.rom. Both need 0x20000 bytes,
the size copied to jagMemSpace + 0xE00000.

The Jaguar CD BIOS is the larger addition: three name groups over five
directories, accepted at exactly 0x40000 bytes and recognised by CRC32
against 687068D5 retail and 55A0669C developer. The group order follows
virtualjaguar_cd_bios_type, then generic names, then the other type,
since a lone file of the wrong type still beats the embedded copy.

None is required, every path falls back to an embedded array. What they
buy is the real dump instead of the reimplementation. The collection
holds the cart boot ROM under boot.rom; both CD BIOSes and jagboot_m.rom
are absent and now show as gaps rather than as nothing at all.
This commit is contained in:
Abdessamad Derraz committed 2026-09-04 17:54:05 +02:00
1 parent f85236fa1e
commit 2ea745a062
1 file changed
+101 -23
+101 -23
View File
@@ -3,8 +3,8 @@ type: libretro
core_classification: community_fork
source: "https://github.com/libretro/virtualjaguar-libretro"
upstream: "http://shamusworld.gotdns.org/git/virtualjaguar"
profiled_date: "2025-03-25"
source_commit: "48096c1f6f8b98cfff048a5cb4e6a86686631072"
profiled_date: "2026-09-04"
source_commit: "03ced5f"
core_version: "v2.1.0"
display_name: "Atari - Jaguar (Virtual Jaguar)"
cores:
@@ -13,28 +13,105 @@ systems:
- atari-jaguar
notes: |
Virtual Jaguar embeds all BIOS ROMs directly in the source code as C arrays
(bin2c generated). No external BIOS files are loaded at runtime. The core
selects between K-series and M-series boot ROMs based on vjs.biosType,
then copies 0x20000 bytes to jagMemSpace + 0xE00000 (libretro.c:902-904).
The boot ROMs are still compiled in, generated by bin2c, but the core no
longer only uses them. Staging moved out of retro_load_game into
stage_cart_boot_rom, which reads a file first and falls back to the
embedded array (libretro.c:5339-5382). BT_M_SERIES tries jagboot_m.rom in
the system directory; BT_CUSTOM, a value the enum did not carry before,
searches six names across the system directory and two subdirectories
(libretro.c:5293-5337). Either way the file has to be 0x20000 bytes, the
size copied to jagMemSpace + 0xE00000; anything shorter is a short read and
the embedded Series K takes over.
The "BIOS" core option (virtualjaguar_bios, disabled by default) controls
whether the embedded boot ROM is executed at startup. When enabled, the
boot ROM entry point is copied to jaguarMainRAM (jaguar.c:644-645).
When disabled, jaguarRunAddress is written directly, skipping the boot
animation. Either way the embedded ROM data is always present in memory.
The Jaguar CD BIOS is the larger change. stage_cd_bios calls
load_external_cd_bios, which walks three name groups over five directories
(libretro.c:5049-5158). The group order follows the
virtualjaguar_cd_bios_type option, then generic names, then the other type,
because a lone file of the wrong type still beats the embedded copy: the
user put it there deliberately. A candidate is accepted at exactly 0x40000
bytes and recognised by CRC32 against two constants
(libretro.c:4964-4965,4971-5048).
The jagBootPath and CDBootPath fields in VJSettings exist in the struct
(settings.h:36-37) but are never populated or used in the libretro port.
No call to RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY or fopen for BIOS files.
The "BIOS" core option (virtualjaguar_bios, disabled by default) still
controls whether the boot ROM is executed at startup. When enabled, the
boot ROM entry point is copied to jaguarMainRAM
(src/core/jaguar.c:1466-1468). When disabled, jaguarRunAddress is written
directly, skipping the boot animation.
Jaguar CD emulation: the CD boot ROM (jaguarCDBootROM, 0x40000 bytes) is
also embedded but Jaguar CD support is incomplete in this core. The
cdrom.c references "CD BIOS" in comments only.
Nothing here is required: every path falls back to an embedded copy, and a
file only replaces it. What the files buy is the real dump rather than the
reimplementation, which is why they are collected.
No external BIOS files are required or loaded by this core.
files:
- name: "[BIOS] Atari Jaguar CD (World).j64"
system: atari-jaguar
required: false
size: 262144
crc32: "687068d5"
validation: [size, crc32]
aliases:
- "[BIOS] Atari Jaguar CD (World).rom"
- "[BIOS] Atari Jaguar CD (World).bin"
- "jaguarcd_bios.bin"
- "jagcd_bios.bin"
- "jaguarcd.bin"
- "jagcd.bin"
- "Jaguar CD BIOS.rom"
- "Jaguar CD BIOS.bin"
description: "Jaguar CD retail BIOS, replacing the embedded copy"
source_ref: "libretro.c:4964, libretro.c:4971-5048, libretro.c:5049-5158, libretro.c:5159-5175"
note: >-
Searched in the system directory and under Atari - Jaguar,
Atari - Jaguar CD, jaguar and jaguarcd. Accepted at exactly 262144
bytes and recognised by its CRC32; a file of the right size whose
checksum matches neither constant is counted as rejected and the
embedded BIOS is used. The generic names are tried after the type the
virtualjaguar_cd_bios_type option selects.
files: []
- name: "[BIOS] Atari Jaguar Developer CD (World).j64"
system: atari-jaguar
required: false
size: 262144
crc32: "55a0669c"
validation: [size, crc32]
aliases:
- "[BIOS] Atari Jaguar Developer CD (World).rom"
- "[BIOS] Atari Jaguar Developer CD (World).bin"
description: "Jaguar CD developer BIOS, selected by virtualjaguar_cd_bios_type"
source_ref: "libretro.c:4965, libretro.c:5049-5158"
note: >-
Same search and the same size and checksum test as the retail BIOS.
Whichever type the option does not select is still tried last.
- name: jagboot.rom
system: atari-jaguar
required: false
size: 131072
validation: [size]
aliases:
- boot.rom
- boot0.rom
- "[BIOS] Atari Jaguar (World).j64"
- "[BIOS] Atari Jaguar Stubulator '94 (World).j64"
- "[BIOS] Atari Jaguar Stubulator '93 (World).j64"
description: "Cart boot ROM read when the BIOS type is set to custom"
source_ref: "libretro.c:5293-5337, libretro.c:5339-5356"
note: >-
Reached only through BT_CUSTOM. Searched in the system directory and
under Atari - Jaguar and jaguar. No checksum is tested; a read shorter
than 131072 bytes leaves the embedded Series K in place.
- name: jagboot_m.rom
system: atari-jaguar
required: false
size: 131072
validation: [size]
description: "Model-M cart boot ROM, read when the BIOS type is Model M"
source_ref: "libretro.c:5358-5380"
note: >-
Read from the system directory only, under that exact name, and only
when biosType is BT_M_SERIES. A short read falls back to the embedded
Model M array.
analysis:
embedded_bios:
@@ -91,12 +168,13 @@ analysis:
filedb_name: "[BIOS] Atari Jaguar Developer CD (World)"
bios_type_enum:
source_ref: "settings.h:46"
source_ref: "src/core/settings.h:61"
values:
- BT_K_SERIES
- BT_M_SERIES
- BT_STUBULATOR_1
- BT_STUBULATOR_2
- BT_CUSTOM
core_option:
key: virtualjaguar_bios
@@ -109,9 +187,9 @@ analysis:
mechanism: embedded
load_address: "0xE00000"
load_size: "0x20000"
source_ref: "libretro.c:902-904"
selection_logic: "biosType == BT_K_SERIES ? jaguarBootROM : jaguarBootROM2"
external_loading: false
source_ref: "libretro.c:5339-5382, libretro.c:6295"
selection_logic: "BT_CUSTOM reads a file, BT_M_SERIES tries jagboot_m.rom, otherwise the embedded array"
external_loading: true
note: |
jagBootPath and CDBootPath struct fields are never set in the libretro
port. The standalone Virtual Jaguar GUI uses them but that code path