game-compatibility icon indicating copy to clipboard operation
game-compatibility copied to clipboard

BLiNX: the time sweeper [MS-019] [1.05]

Open PatrickvL opened this issue 8 years ago • 38 comments

Wikipedia

Description

Previously the game displayed intro screens, but on the current build that is not the case and instead the loading screen will flash briefly before crashing.

Also if you have no controllers plugged in you can hear the menu music (needs confirmation? see this video)

---------------------------
Cxbx-Reloaded
---------------------------
Received Exception Code 0xC0000005 @ EIP := 0x58149F6A

  Press "OK" to terminate emulation.
  Press "Cancel" to debug.
---------------------------
OK   Cancel   
---------------------------

Dumps

KrnlDebug.txt CxbxDebug.txt BlinxXbe.txt

Status

Previous behavior: Showed intro videos, albeit laggy and with incorrect sound.

Current behavior: Flashes loading screen briefly before crashing

Screenshots

Current Behavior: vlc_2017-10-09_11-12-19 firefox_2017-10-09_11-12-50 Video

Previous Behavior: screenshot_5 screenshot_6

Additional Information

Tested on version 6a798ad5 (Oct 8 2017)

Copied from original issue: Cxbx-Reloaded/Cxbx-Reloaded#235 Xbe.txt

PatrickvL avatar Aug 21 '17 15:08 PatrickvL

From @furrya on March 17, 2017 6:47

Now the game has regression - black screen with an exception code

screenshot_1

And here two KrnlDebug files First with graphic progress, from earlier build and 2 - from a latest build 1) KrnlDebug — graphics.txt 2) KrnlDebug - no graphics.txt

PatrickvL avatar Aug 21 '17 15:08 PatrickvL

The first real difference between those two logs is that EmuD3DDevice_SetRenderState_YuvEnable is present in build Cxbx-Reloaded/Cxbx-Reloaded@a7ad4921 and absent in Cxbx-Reloaded/Cxbx-Reloaded@64aac86d.

Alas, the older log doesn't contain the HLE log, so it can't be compared, but the newer log mentions HLE: 0x00134BB0 -> D3DDevice_SetRenderState_YuvEnable_4134. It's possible this is the wrong location.

PatrickvL avatar Aug 21 '17 15:08 PatrickvL

From @furrya on March 30, 2017 13:41

It's fixed with Cxbx-Reloaded/Cxbx-Reloaded@3eb9b7d5, intro videos returned ^^ screenshot_2

PatrickvL avatar Aug 21 '17 15:08 PatrickvL

From @furrya on April 18, 2017 11:50

Cxbx-Reloaded/Cxbx-Reloaded@77933ad8


Video in the game is broken now in Cxbx-Reloaded/Cxbx-Reloaded@77933ad8. Just black screen with laggy sounds in the background. screenshot_1 KrnlDebug.txt

Updated - Cxbx-Reloaded/Cxbx-Reloaded@42e87e7b


The video has appeared, but not stretched normally. Controller emulation does not seem to work now, I am not able to skip the intros. screenshot_1 screenshot_2

PatrickvL avatar Aug 21 '17 15:08 PatrickvL

From @furrya on May 4, 2017 7:46

Blinx - the time sweeper doesn't show videos anymore, instead the game shows a loading screen and crashes. Cxbx-Reloaded/Cxbx-Reloaded@9173d4ab

screenshot_1 screenshot_2 screenshot_3


KrnlDebug.txt

PatrickvL avatar Aug 21 '17 15:08 PatrickvL

Latest logs, taken from #266 CxbxDebug.txt KrnlDebug.txt

BelleNottelling avatar Aug 28 '17 09:08 BelleNottelling

Update on this one, just tested it out! Looks like it's back to flashing the loading screen for a second and then crashing. The log says that it couldn't assemble a recompiled pixel shader.

Casuallynoted avatar Sep 29 '17 19:09 Casuallynoted

For all regressions, we're most interested in hearing about which commit broke it (using a git bisect), so we can quickly zoom into the issue

Oh, also make sure to clean the HLE cache when switching to another build, because function detection was and is still very much in flux.

PatrickvL avatar Sep 29 '17 19:09 PatrickvL

Whoops, just saw this! Did a clean of the HLE cache, posted logs over in the main blinx issue, but I'll also pop them over here for ease of access. Not sure which build broke it as I'm pretty new to the CXBX project but if there's any way I could help to figure out which commit it was I'd love to help with that. :)

KrnlDebug.txt CxbxDebug.txt

Casuallynoted avatar Oct 09 '17 04:10 Casuallynoted

Whoops, just saw this! Did a clean of the HLE cache, posted logs over in the main blinx issue, but I'll also pop them over here for ease of access. Not sure which build broke it as I'm pretty new to the CXBX project but if there's any way I could help to figure out which commit it was I'd love to help with that. :)

KrnlDebug.txt CxbxDebug.txt

I've done a test with this title and get a flashing loading screen before it crashing, did you get the same results with these logs? Also an xbe dump (Edit>Dump Xbe Info To...) would be helpful in verifying that we have the same version of the game.

CakeLancelot avatar Oct 09 '17 14:10 CakeLancelot

Yes, that's correct, currently getting a flashing loading screen. Attached is the dump! 1.05: BlinxXbe.txt

Casuallynoted avatar Oct 09 '17 15:10 Casuallynoted

Yes, that's correct, currently getting a flashing loading screen. Attached is the dump!

Updated, and to be clear this issue originally was for the PAL version while the attached dump appears to be NTSC - though I don't know if it warrants separation into two issues because as far as I know the end result is the same on either version. This and one other issue regarding menu music will need to be confirmed. I added some info about the latter in the issue.

CakeLancelot avatar Oct 09 '17 16:10 CakeLancelot

Awesome! Yeah- so far I've tested both regions and they seem to be about the same in terms of issues at the moment. If there's anything else I can do to help provide additional info, let me know^ Would be awesome to see the game get to the menus. :D

Casuallynoted avatar Oct 09 '17 16:10 Casuallynoted

@CakeLancelot If both PAL and NTSC has the same library version. It should be acceptable to have both PAL and NTSC in same issue. Unless both have a different failure says otherwise.

In the dump of NTSC build is 4831 library version.

RadWolfie avatar Oct 09 '17 19:10 RadWolfie

Crashing before video again I guess from reading this post.

CxbxDebug.txt KrnlDebug.txt 1.05: Xbe.txt

sketch

My Specs: CPU: AMD FX8150 3.6ghz, boost to 4.2ghz GPU: AMD R9 290 4gb, driver Crimson 18.1.1 RAM: 8gb ddr3 Windows 10 Pro 64bit

sonicjam717 avatar Jan 31 '18 15:01 sonicjam717

Description

Booting, but when playback FMV has crash with CreateTexture Failed!.

[1670] WARN: CreateTexture Failed!

Error: 8876086C
Format: 844715353
Dimensions: 1024x512

Dumps

KrnlDebug.txt

Status

Previous behavior: Crashes before videos.

Current behavior: Crash with CreateTexture Failed!

Screenshots

Additional Information

Tested with Cxbx-Reloaded/Cxbx-Reloaded@735a4bcf

jeltaqq avatar Feb 10 '18 07:02 jeltaqq

https://www.youtube.com/watch?v=SoeDh6kObz4

New video from John GodGames showing Blinx now gets in-game, though it seems you need wire-frame in order to see what you're doing. Game looks like it is extremely slow right now as well, but nice progress nontheless!

EDIT: This actually seems to be footage from a WIP branch from Luke; just thought I should make that clear.

Voxel9 avatar Mar 04 '18 16:03 Voxel9

Cxbx-Reloaded/Cxbx-Reloaded@d784ce1f: tested using HLE mode, Windows 10, Nvidia GPU

image

Shideravan avatar Apr 07 '18 15:04 Shideravan

Cxbx-Reloaded/Cxbx-Reloaded@a59df66b HLE mode

Tanxinaz avatar May 16 '18 17:05 Tanxinaz

Got the same message, but a different line capture

ghost avatar May 27 '18 04:05 ghost

NTSC version has videos not playing for me, but menu works nicely.

When starting a game, frames take roughly 20 seconds to render what seems to be a solid color.

Cxbx-Reloaded/Cxbx-Reloaded@65a1f10a

Tenrys avatar Oct 25 '18 16:10 Tenrys

The game displays the first two loading screens then shows a blackscreen. Audio is working perfectly. Pressing the A button on the controller gets you to the main menu. The main menu (and all sub-menus) are fully functional but only partially load. The animated backgrounds are just a black screen. When attempting to start a new game the audio for the intro video plays perfectly, but again, it just displays a black screen. Skipping the intro video makes the game attempt to load, the FPS drops to around one and the game never actually renders anything, but again, the sound plays perfectly. Note: If you wait long enough you can see behind the loading screen, but like I said, nothing renders.

blinx_1

1.05, tampered with: Xbe.txt

If anyone wants me to log anything specific, please let me know.

Insan1ty0ne avatar Jan 05 '19 04:01 Insan1ty0ne

Getting pretty much the same here. I have a feeling it's rendering this slow in-game because it's supposed to run at 30fps, or some unoptimal code in the DirectX stuff. But what happens if I hack the game to run at 60fps...?

jthecodebuilder avatar Jan 05 '19 21:01 jthecodebuilder

It'll probably run even slower seeing as it'd have to produce more frames (and at a faster rate) than 30fps. As you say, it's likely just unoptimal code at the moment.

Voxel9 avatar Jan 06 '19 14:01 Voxel9

The reason it renders so slowly is probably because the game renders the models (they aren't visible, but are still there) in around 600 chunks each due to what I'm guessing is an emulation bug. Just try using a graphics debugger or model ripper (like NinjaRipper) and you will get hundreds to thousands of meshes, each being around 3-6 tris.

BLiNXthetimesweeperGOD avatar Sep 01 '19 16:09 BLiNXthetimesweeperGOD

There IS indeed a situation that results in that last described behaviour, I'll look it up and link it here.

EDIT : See this comment in code : https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/blob/develop/src/core/hle/D3D8/Direct3D9/Direct3D9.cpp#L7528

// Indexed quadlist can be drawn using unpatched indexes via multiple draws of 2 'strip' triangles :
// 4 vertices are just enough for two triangles (a fan starts with 3 vertices for 1 triangle,
// and adds 1 triangle via 1 additional vertex)
// This is slower (because of call-overhead) but doesn't require any index buffer patching.
// Draw 1 quad as a 2 triangles in a fan (which both have the same winding order) :
// Test-cases : XDK samples reaching this case are : DisplacementMap, Ripple
// Test-case : XDK Samples (Billboard, BumpLens, DebugKeyboard, Gamepad, Lensflare, PerfTest?VolumeLight, PointSprites, Tiling, VolumeFog, VolumeSprites, etc)

So I guess we can add this title to the list of test cases

PatrickvL avatar Sep 01 '19 19:09 PatrickvL

The reason I chose for that approach, is to avoid yet another resource conversion (in this case index buffers), which would also require a cache and a costly modification check, all requiring additional complexity and code to maintain.

~~However, now that I think of it, I may have a solution that will also work, but doesn't require a call per quad nor conversion of the index buffer. I'll document this in an issue~~ Nope, I thought maybe index buffers have a stride after each primitive, so that the same index buffer could be drawn twice, first with a stride of one after each triangle, the second draw starting at one index aside the first draw, with also a stride of one after each triangle. But alas, there is no such thing as a per primitive stride when using index buffers.

So there's no other way than to keep doing it like this, or to convert index buffers. (The conversion is quite simple though: each set of four indices, A,B,C,D must be expanded into a set of six indices A,B,C,A,C,D so that's 50% more entries to render twice the number of quads as triangles)

PatrickvL avatar Sep 01 '19 19:09 PatrickvL

Converting is the best idea because that results in less draw calls, and the number of draw calls made is one of the largest impacts to performance in graphics programing.

The vertex caches should negate the need for multiple conversions per-draw.

LukeUsher avatar Sep 01 '19 21:09 LukeUsher

Regression. Cxbx-Reloaded/Cxbx-Reloaded@c0cdb011 Capturecxlb Capturecxlb2

jthecodebuilder avatar Oct 20 '19 19:10 jthecodebuilder

Slowness due to repeated indexed quadlist draws will be addressed in issue https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/issues/1749 (pending PR : https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/pull/1757)

PatrickvL avatar Oct 20 '19 22:10 PatrickvL