Hackers quickly prove that Neo Geo Doom ports are not "impossible"
Hackers quickly prove that Neo Geo Doom ports are not “impossible”
黑客迅速证明 Neo Geo 移植《毁灭战士》并非“不可能”
Last month, we passed along Modern Vintage Gamer’s (MVG) confident assertion that Doom is functionally impossible to run on the Neo Geo, owing to the console’s sprite-based display hardware and lack of a frame buffer. We all should have known better than to tell a dedicated group of hackers that something is “impossible,” though, as two recent projects have made great progress toward functional Doom ports on stock Neo Geo hardware. Both of these projects have significant graphical compromises that limit how viable they would have been for a marketable, ’90s-era console port, as MVG lays out in a new video. Still, they stand as a testament to the surprising results that clever, determined coders can coax out of legacy hardware.
上个月,我们报道了 Modern Vintage Gamer (MVG) 的断言,他当时自信地表示,由于 Neo Geo 主机采用基于精灵图(sprite)的显示硬件且缺乏帧缓冲区,因此在上面运行《毁灭战士》(Doom)在功能上是不可能的。然而,我们早该明白,不应该对一群执着的黑客说某件事是“不可能的”。最近的两个项目已经在原版 Neo Geo 硬件上移植《毁灭战士》方面取得了巨大进展。正如 MVG 在一段新视频中所述,这两个项目都存在显著的图形妥协,这限制了它们在 90 年代作为商业主机游戏的可行性。尽管如此,它们依然证明了聪明且坚定的程序员能够从老旧硬件中挖掘出令人惊叹的潜力。
It looks like Doom if you squint
眯起眼睛看,它就是《毁灭战士》
To create the Doom64KB project for the Neo Geo, coder FrenkelS adapted an earlier Doom port they designed to run on 16-bit PC processors like the 8088 and 286. Using that engine, the Neo Geo code then makes a kind of proto frame buffer out of the console’s fix layer, an area of display memory that’s usually used to display menus and HUD information on top of gameplay. By rendering to this fix layer, the Doom64KB engine can animate a relatively smooth version of Doom maps, albeit one that uses chunky, 8×8 pixel tiles at an effective resolution 28×32 (and just 16 colors, limiting the “light diminishing” effect as walls recede into the distance). A slight modification of the same idea builds a frame buffer from the Neo Geo’s sprite memory, increasing the effective resolution to 80×56 by using 4×4-pixel blocks. While that increase comes at a noticeable cost to frame rate, things could get smoother with further optimization or with overclocked hardware like that on the upcoming Neo Geo AES+.
为了创建 Neo Geo 的 Doom64KB 项目,程序员 FrenkelS 改编了他们早期为 8088 和 286 等 16 位 PC 处理器设计的《毁灭战士》移植版。利用该引擎,Neo Geo 的代码利用主机的“固定层”(fix layer)构建了一种原始帧缓冲区——这块显示内存区域通常用于在游戏画面上方显示菜单和 HUD 信息。通过渲染到这一层,Doom64KB 引擎能够以相对流畅的方式呈现《毁灭战士》地图,尽管它使用的是粗糙的 8×8 像素块,有效分辨率仅为 28×32(且只有 16 色,限制了墙壁远去时的“光线衰减”效果)。对这一思路稍作修改,利用 Neo Geo 的精灵图内存构建帧缓冲区,可以将有效分辨率通过 4×4 像素块提升至 80×56。虽然这种提升会明显牺牲帧率,但通过进一步优化或使用即将推出的 Neo Geo AES+ 等超频硬件,画面可能会变得更加流畅。
Meanwhile, the Doom-NG project operates similarly to the sprite-strip raycaster that MVG discussed as a potential option in his original Neo Geo Doom video. While that raycaster only worked on simple, Wolfenstein 3D-style 90-degree-angled grids, Doom-NG’s VSlice renderer handles more complex geometry by stepping through a Doom map’s BSP tree to determine what walls and other objects are visible from the player’s perspective. The renderer then uses the Neo Geo hardware to efficiently scale sprites into 16-pixel-wide strips, simulating the wall’s size and position in that column of the screen.
与此同时,Doom-NG 项目的运作方式类似于 MVG 在其最初的 Neo Geo《毁灭战士》视频中讨论的作为潜在方案的“精灵图条纹光线投射器”(sprite-strip raycaster)。虽然那个光线投射器只能在简单的《德军总部 3D》风格的 90 度角网格上工作,但 Doom-NG 的 VSlice 渲染器通过遍历《毁灭战士》地图的 BSP 树来确定从玩家视角可见的墙壁和其他物体,从而处理更复杂的几何结构。随后,渲染器利用 Neo Geo 硬件将精灵图高效缩放为 16 像素宽的条纹,从而模拟墙壁在屏幕该列中的大小和位置。
The result is an accurate, if stripey, visual representation of a Doom player’s perspective that can be navigated freely at a relatively high frame rate. But the graphical limits of this rendering method are pretty apparent in walls and doors, with distractingly repetitive textures and angled surfaces that show awkward “stairstep” edges, especially at close range. Both of these projects are still quite early and will need further refinements to add important elements like enemy logic, music, and weapon selection. Even in this unrefined state, though, the porting community has shown just how efficiently it can tackle a problem once an “impossible” gauntlet is laid down.
最终呈现的效果是《毁灭战士》玩家视角的准确(尽管带有条纹)视觉再现,并且可以以相对较高的帧率自由移动。但这种渲染方法的图形局限性在墙壁和门上表现得非常明显,纹理重复得令人分心,倾斜表面在近距离下会出现尴尬的“阶梯状”边缘。这两个项目目前都处于早期阶段,还需要进一步完善,以加入敌人逻辑、音乐和武器选择等重要元素。然而,即使在如此粗糙的状态下,移植社区也已经证明,一旦面对“不可能”的挑战,他们解决问题的效率是多么惊人。