death-droid / Rice-Video

35 stars 6 forks source link

Killer Instinct Gold 1.2 crashes #23

Open LegendOfDragoon opened 8 years ago

LegendOfDragoon commented 8 years ago

There's something wrong with ProcessRDPList. The crash is somewhere in that function.

death-droid commented 8 years ago

Hmm will look into it, i really need to start back over with this sooner rather then later :) Been a bit burnt out

LegendOfDragoon commented 8 years ago

Alright cool. I may actually go ahead and debug this later today. I don't think it's a regression because I can't play the game on any version of Rice.

LegendOfDragoon commented 8 years ago

The problem has to do with processDlist not calling end sync when it's apparently supposed to. A hacky workaround is to always just do *g_GraphicsInfo.MI_INTR_REG |= MI_INTR_DP at the end of processDlist, but that breaks games. So basically it must not be calling all of the commands in the Dlist.

death-droid commented 8 years ago

Hmmmm interesting @LegendOfDragoon I might have a look at Gliden64 and co to see if theres any fancy ways they handle it.

LegendOfDragoon commented 8 years ago

Wow, I guess there were more issues than I thought. First issue is that it crashes here https://github.com/death-droid/Rice-Video/blob/master/Parser/RSP_Parser.cpp#L704 because gUcodeFunc is null. After bypassing that issue, another problem is the fact that it does a very long loop here https://github.com/death-droid/Rice-Video/blob/master/Render/DirectX/D3DRender.cpp#L316 . It's because nstages was never set at that point. Calling m_pColorCombiner->InitCombinerMode() before the other functions in SetCombinerAndBlender "fixes" this loop problem, but I really don't know what's supposed to be done. I just hacked around to see if I can get it booting, which I did, but the graphics are really bugged. I hope you can figure out a proper solution. I know that nstages is set in the initcombiner function, but am not sure if it's really a good idea to call initcombiner before the other functions.

death-droid commented 8 years ago

Ahhhwow, there is a large chance that the RDP_ processing code is completely and utterly unimplemented, I've never actually tried any of the Rice Plugins handling LLE DLists.