github Laffinty/FCEUX11 v2.0.4_hotfix1
FCEUX11 v2.0.4_hotfix1

38 minutes ago

Two loader and mapper defects fixed: cartridges that never ran their own board code now do, and legal ROMs with an unusual CHR size are no longer refused

75 mapper numbers were in the board table but missing from the cartridge registry, so the power cycle never reached the board's own code The loader builds a cartridge object out of a registry; when the number is not in it, a placeholder was kept whose power function does nothing, and the board's own power routine — the one that installs the $6000-$7FFF write handler, seeds the expansion registers, maps the board's work RAM and hooks the scanline IRQ — was never called. Registers written by the game simply went nowhere, which is why boards such as COOLGIRL (342), SAN GUO ZHI PIRATE (252), DECATHLON (244) and the BANDAI family came up grey or lost every register write. The list turned out to hold 75 numbers rather than the 42 first recorded: whole families had been missed, because their init installs the power routine indirectly. The loader now keeps the board's own power pointer when the registry has no entry, exactly as the UNIF path already did. The picture changes for every one of these cartridges, and the playback of existing movies for them changes accordingly.

Legal ROMs with a CHR bank count that is not a power of two were rejected as an unknown format Such a cart says, for instance, six 8 KiB CHR banks, and the file really does carry 48 KiB — but the emulator maps a rounded, power-of-two CHR buffer, and the loader's file-boundary check was asking for the rounded size, so the cart never fit and it was refused with an "Unknown ROM file format" box. Upstream FCEUX has no such check: it fills the rounded buffer with 0xFF and then reads the bytes the file has, which is why the same cart loads there. The check and the copy now use the count from the header, while the allocation, the mapping and the hash keep the rounded size. This also makes the CRC32 and MD5 of these carts byte-identical to upstream, so upstream's ROM-correction table can now reach them.


修复两个 loader 与 mapper 缺陷:此前从未执行自身板级代码的卡带现在会执行,CHR 尺寸特殊的合法 ROM 也不再被拒

75 个 mapper 号在板表里有登记、却不在卡带注册表里,于是上电流程从未走到板子自己的代码 loader 依注册表构造卡带对象;号不在表里时它留下的是一个上电函数什么都不做的占位对象,于是板子自己的上电函数——装 $6000-$7FFF 写处理器、给扩展寄存器赋初值、映射板载工作 RAM、挂扫描线 IRQ 的那一个——根本没被调用,游戏写下去的寄存器全部落空,也正是 COOLGIRL(342)、SAN GUO ZHI PIRATE(252)、DECATHLON(244)与 BANDAI 家族等板子表现为灰屏、或寄存器写全丢的原因。名单最终是 75 个号,而不是最初记录的 42 个:有一整片家族被漏掉,因为它们的 init 是间接装上上电函数的。loader 现在在注册表查不到时保留板子自己的上电指针,与 UNIF 路径的既有做法一致。这些卡带的画面会随之变化,既有录像的回放同样如此。

CHR 银行数不是 2 的幂的合法 ROM 被判为未知格式而拒收 这类卡带的头会写六个 8 KiB CHR 银行,文件里也确实只有 48 KiB——但模拟器映射的是向上取整到 2 的幂的 CHR 缓冲,而 loader 的文件边界检查按取整后的尺寸去要,于是卡带永远"装不下",被以 "Unknown ROM file format" 拒之门外。上游 FCEUX 没有这项检查:它把取整后的缓冲填成 0xFF,再只读文件实有的字节,所以同一个卡带在那里能装。现在边界检查与拷贝改用头部声明的数量,分配、映射与哈希仍用取整值。这也让这些卡带的 CRC32 与 MD5 与上游逐字节相同,上游的 ROM 矫正表因此能命中它们。

Download FCEUX11

Don't miss a new FCEUX11 release

NewReleases is sending notifications on new releases.