PC Engine CD BIOS Devlog: Reaching BIOS API Entry Points in Local Retail Disc Traces

PC Engine CD BIOS Devlog: Reaching BIOS API Entry Points in Local Retail Disc Traces

I’m developing oss-pce-cd-bios, an open-source project aiming to replace the PC Engine / TurboGrafx-CD System Card firmware. The previous update covered a multi-sector synthetic IPL loader running through a separate 256 KiB development image on a pinned Geargrafx core. Since then, the most interesting result isn’t a larger test count. Local traces of two commercial CDs now reach BIOS API entry points after the IPL, rather than stopping at the earlier media-layout mismatch. To be precise: neither disc reached a title screen, and no retail-game compatibility is claimed. The observed calls still lead to unimplemented development stubs.

我正在开发 oss-pce-cd-bios,这是一个旨在替换 PC Engine / TurboGrafx-CD 系统卡固件的开源项目。之前的更新涵盖了一个多扇区合成 IPL 加载程序,它在固定的 Geargrafx 核心上通过一个独立的 256 KiB 开发镜像运行。自那以后,最有趣的结果并非测试数量的增加。两张商业 CD 的本地追踪记录现在可以在 IPL 之后到达 BIOS API 入口点,而不是像之前那样停留在媒体布局不匹配的问题上。准确地说:没有任何光盘进入了标题画面,也不声称具备任何零售游戏的兼容性。观察到的调用仍然指向未实现的开发存根。

Getting beyond the pre-API blocker: The original diagnostic loader used a synthetic disc-layout assumption. On the locally held commercial CUE/BIN media, that assumption could place the IPL information-sector selection incorrectly, producing a PRE_API_BLOCKER_OBSERVED result before the BIOS interface could even be studied. PR #728 introduced explicit opt-in local CUE discovery. The —commercial mode only considers local media under ./rom/; the public CI suite does not search for or consume private commercial images. PR #730 then added a CUE-aware automatic loader configuration: Parse the selected CUE text and derive the data track’s INDEX 01 position using file-size metadata without reading the BIN payload. Apply that position to a purpose-built PUBLIC diagnostic loader, with separate DEV behavior preserved. Reject unsupported or ambiguous layouts and unsafe destination-overflow cases. Keep names, absolute paths, media content, hashes, and private sector coordinates out of the public manifest and evidence.

突破 API 前的阻碍:最初的诊断加载程序使用了合成光盘布局假设。在本地持有的商业 CUE/BIN 媒体上,该假设可能会导致 IPL 信息扇区选择错误,从而在 BIOS 接口被研究之前就产生 PRE_API_BLOCKER_OBSERVED 结果。PR #728 引入了显式的本地 CUE 发现功能。—commercial 模式仅考虑 ./rom/ 下的本地媒体;公共 CI 套件不会搜索或使用私有的商业镜像。PR #730 随后增加了 CUE 感知的自动加载程序配置:解析选定的 CUE 文本,并利用文件大小元数据推导出数据轨道的 INDEX 01 位置,而无需读取 BIN 有效载荷。将该位置应用于专门构建的公共诊断加载程序,同时保留独立的开发行为。拒绝不支持或模棱两可的布局以及不安全的目地溢出情况。将名称、绝对路径、媒体内容、哈希值和私有扇区坐标排除在公共清单和证据之外。

The resulting local measurements, made with a pinned Geargrafx core in cold and warm configurations, were: Loader Two locally tested commercial discs Previous synthetic-layout selection PRE_API_BLOCKER_OBSERVED Automatic DEV loader control PRE_API_BLOCKER_OBSERVED Automatic PUBLIC diagnostic loader API_ENTRY_CONFIRMED. One disc reached a JSR into candidate slot $02; another reached a sequence of API calls followed by a stub halt. The observer checks the call/return sequence before classifying a result as confirmed. This is an instrumentation milestone, not a functioning replacement BIOS. The commercial bytes stay local, and no private traces or game-derived content are published to the repository or CI.

在冷启动和热启动配置下,使用固定的 Geargrafx 核心进行的本地测量结果如下:加载程序在两张本地测试的商业光盘上,之前的合成布局选择显示为 PRE_API_BLOCKER_OBSERVED,自动开发加载程序控制显示为 PRE_API_BLOCKER_OBSERVED,而自动公共诊断加载程序显示为 API_ENTRY_CONFIRMED。一张光盘成功跳转(JSR)至候选槽位 $02;另一张光盘执行了一系列 API 调用,随后在存根处停止。观察者在将结果分类为“已确认”之前会检查调用/返回序列。这是一个仪器化里程碑,而非功能性的替代 BIOS。商业字节保留在本地,没有任何私有追踪记录或游戏衍生内容被发布到存储库或 CI 中。

Investigating CD_BASE without pretending the ABI is known: The candidate at slot $02 is being investigated as CD_BASE, but that identification and its precise ABI are not verified. PR #731 builds a host-side discriminator for competing address-coordinate models: absolute LBA, track-relative, INDEX 00-relative, and other caller-adjusted interpretations. PR #733 adds a sanitized observation catalogue and fail-closed schema, while PR #736 rejects unknown or unsupported host-side CD_BASE conditions. None of these PRs execute the proprietary reference entry point. The candidate’s register behavior, side effects, error contract, and LBA origin remain unresolved. A model that can distinguish hypotheses is not a measurement that proves one hypothesis correct.

在不假定已知 ABI 的情况下调查 CD_BASE:槽位 $02 处的候选对象正被作为 CD_BASE 进行调查,但该标识及其精确的 ABI 尚未得到验证。PR #731 为相互竞争的地址坐标模型构建了一个主机端判别器:绝对 LBA、轨道相对、INDEX 00 相对以及其他调用者调整的解释。PR #733 增加了一个经过清理的观察目录和故障关闭模式,而 PR #736 则拒绝未知或不支持的主机端 CD_BASE 条件。这些 PR 均未执行专有的参考入口点。候选对象的寄存器行为、副作用、错误契约和 LBA 起源仍未解决。一个能够区分假设的模型,并不等同于证明某个假设正确的测量结果。

Better refusal boundaries and stronger evidence gates: PR #734 improves the synthetic multi-sector loader by probing its final target sector before performing the first load-area write. Some end-of-media failures that previously occurred after partial copying are now rejected with zero copied bytes. This is still a reachability probe, not a guarantee that all sectors belong to the intended data track. Other failure modes and the media track-length contract remain open. Separately, the pinned-core ST/IRQ/MMIO diagnostic in PR #732 was merged after additional no-resume, instruction-fetch, and side-effect validation. The E1–E3, E4–E5, and unified host judge work is also merged. These components exercise synthetic pre-block and device-access decisions, but their fixture-level PASS is not permission to execute reference firmware. The production gate remains blocked.

更好的拒绝边界和更强的证据门控:PR #734 通过在执行第一次加载区域写入之前探测其最终目标扇区,改进了合成多扇区加载程序。一些之前在部分复制后发生的媒体末端故障,现在在复制字节数为零时即被拒绝。这仍然是一个可达性探测,并不能保证所有扇区都属于预期的数据轨道。其他故障模式和媒体轨道长度契约仍然悬而未决。另外,PR #732 中的固定核心 ST/IRQ/MMIO 诊断在经过额外的无恢复、指令获取和副作用验证后被合并。E1–E3、E4–E5 和统一主机判断工作也已合并。这些组件执行合成的预阻塞和设备访问决策,但它们在测试装置级别的通过并不代表可以执行参考固件。生产门控仍然处于阻塞状态。

The development ROM now has 15 entries: Finally, PR #748 added a project-defined EX_JOYREP implementation at candidate slot $22. The DEV contract returns while preserving the tested CPU state, stack, and page registers; pinned Geargrafx regression tests and an intentionally broken mutant check the behavior. As of the November 10 main snapshot (890c149): Evidence axis Current status; Project-owned DEV entry implementations 15/81; Remaining nonreturning stubs 66/81; Independently verified reference BIOS ABIs 0/81; Permitted reference BIOS JSR entries 0/81; Demonstrated retail-game title screens 0; Release eligibility false. Upcoming work includes safely characterizing the first required CD-related API contracts, replacing one stub at a time, and refining IPL address-range handling. Work in open draft PRs, including wider LBA support, is not counted as a merged capability. The project is still far from a distributable, compatible System Card. But reaching an observable BIOS call boundary on real local disc layouts provides a more concrete target for the next implementation step than merely improving synthetic boot tests.

开发 ROM 现在有 15 个条目:最后,PR #748 在候选槽位 $22 处添加了一个项目定义的 EX_JOYREP 实现。开发契约在返回时保留了被测 CPU 状态、堆栈和页面寄存器;固定的 Geargrafx 回归测试和一个故意破坏的变体检查了该行为。截至 11 月 10 日的主分支快照 (890c149):证据轴当前状态;项目拥有的开发入口实现 15/81;剩余未返回的存根 66/81;独立验证的参考 BIOS ABI 0/81;允许的参考 BIOS JSR 入口 0/81;演示的零售游戏标题画面 0;发布资格为假。接下来的工作包括安全地表征第一个必需的 CD 相关 API 契约,一次替换一个存根,并优化 IPL 地址范围处理。处于开放草案 PR 中的工作(包括更广泛的 LBA 支持)不计入已合并的功能。该项目距离可分发、兼容的系统卡还很遥远。但在真实的本地光盘布局上达到可观察的 BIOS 调用边界,为下一步实现提供了一个比单纯改进合成引导测试更具体的目标。