Xenia: Regression in loading games

Created on 18 Jul 2019  路  2Comments  路  Source: xenia-project/xenia

Describe what's going wrong:

When using https://github.com/xenia-project/xenia/commit/1e5fa610307bec06b5a13e9058b2cf89245b7011 various XBLA games fail to boot. Perfect Dark is the only title I have that still boots with this build. Radiant Silvergun, Galaga Legions DX, and Guwange all fail to load.

Some games on disc were also reported to fail to load on this build by others, including Need For Speed: Most Wanted, Need For Speed: Carbon, Idol Master 2, and Farming Simulator 15 and 13.

When talking about the issue on the Discord, this PR was pointed to as a likely culprit: https://github.com/xenia-project/xenia/pull/1399

Describe what should happen:

When using https://github.com/xenia-project/xenia/commit/7a88789ebd4dd65e297835a0f896397626fc9cbe every XBLA game I try boots fine including Radiant Silvergun, Galaga Legions DX, and Guwange.

Log:

Radiant Silvergun's launch failure xenia.zip

bug

Most helpful comment

Oops. I'll fix that.

All 2 comments

It looks like https://github.com/xenia-project/xenia/commit/29665ae79c862a1bc0818f625b59384273a9dac4#diff-a00c702359b66e5b424d8b0c2bf2b173R99 might be the cause for this, xe::bit_count seems to be returning a different count than what LZX needs, eg. for one XEX I tried it'd set window_bits to 1, while the older bit counting loop would set it to 0xf.

Changing the code to use the older loop seems to let the rest of the commit work fine, so I'm pretty sure it's just the bit-counting change that caused this.

EDIT: looks like LZX wants the bits position instead of the number of bits set, maybe it's xe::bit_scan_forward we want to use instead of xe::bit_count? That does seem to return the same value as the older counting loop.

Oops. I'll fix that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adokova picture adokova  路  4Comments

thx4ever picture thx4ever  路  3Comments

CGWatkins picture CGWatkins  路  4Comments

arcadee1977 picture arcadee1977  路  3Comments

drillsar picture drillsar  路  4Comments