XaiJu
LukeUsher
LukeUsher

patreon


Progress Report (July 2019)

Firstly, I would like to apologise for the late progress report. No excuses, just life got in the way.

So July was a very busy month for Cxbx-Reloaded, with 29 pull-requests being merged within 31 days, consisting of 86 commits. That's a lot of code, but most of the changes are minor improvements. The most notable changes are as follows:

High Resolution Rendering

[PR 1655: https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/pull/1655

An often requested feature eventually landed in Cxbx-Reloaded: High-Resolution Rendering.

It is now possible to run Xbox games in Cxbx-Reloaded at upto 8x internal resolution, with minimal performance impact. This means that a game that is designed to run at 640x480, can render with the internal resolution as high as 5120x3840. 


A nice side-effect of this work is that we also improved the accuracy of some parts of the render pipeline, which brings us to the next change:

Removal of the Render to Host Backbuffer Hack

 [PR 1667: https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/pull/1667]  

This hack was a remnent of a limitation of using DirectX 8 in the past: Emulating the Xbox frame buffer and blitting it to the host was very slow, so a speed-hack was introduced to bypass framebuffer emulation and use the host framebuffer directly. However, since the switch to DirectX 9, this was no longer required: we were able to use the StretchRects functionality to do the blit on the GPU, reduding the performance impact.

That being said, this hack was kept around because it worked around some emulation bugs in a few games, and also the community figured out that by combining this hack with a wrapper such as dgVoodoo, they could 'hack' in high-resolution rendering.

Since we now have a proper solution for high-resolution, and the work towards that eliminated most of the bugs that require this hack, the decision was taken to remove it.

Many improvements to Vertex Shader Emulation

[PR 1683: https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/pull/1683]   

The bulk of this pull-request involved updating our Vertex Shader converter to implement one major difference between Vertex Shaders on Windows, with DirectX and the Xbox.

Vertex Shaders must write vertex output to the oPos register, this register determined where on screen the current vertex will be drawn.

On Windows, the oPos register is read-only, but on the Xbox, reading the temporary register r12 returns the current value of oPos.

Some Xbox games depend on this functionality, so we implemented it by forwarding all writes to oPos to writes to r12, and then appending an extra instruction at the end of the shader to write r12 back to oPos.

As an aside, this PR also rebuilt the conversion of Vertex Declaration and register mappings between the Xbox and the Host formats, as a result. almost all occurances of Vertex Declaration Errors have been eliminated.

These changes have drastically improved some titles, a notable one being Silent Hill 2.


Before:


After:


Summary

Just like the previous month, our friend Strelok (Literalmente{Game}) has kindly provided some stats and his test results (see attached). As you can see, this month brought a dignificant compatibility improvements, with half of the titles that were tested reaching in-game or better status.


A little something extra: I was finally able to get hold of working Chihiro arcade hardware this month, so you can expect some developments in the Sega Chihiro side of Cxbx-Reloaded very soon.


 


More Creators