Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XFB Scaling #977

Merged
merged 2 commits into from Sep 19, 2014
Merged

Conversation

Sonicadvance1
Copy link
Contributor

Not my branch, but I want comments on this since it fixes bunch of issues
Fixes Cubivore image scaled incorrectly(Issue 7618)
JMC has more things it fixes.

@shuffle2
Copy link
Contributor

shuffle2 commented Sep 5, 2014

Seems to make sense, not sure completely correct.

@Sonicadvance1
Copy link
Contributor Author

http://gdurl.com/Wx_i
After change is on the left, before is on the right.

@booto
Copy link
Contributor

booto commented Sep 5, 2014

Should this depend on m_HorizontalScaling.HS_EN (// Enable Horizontal Scaling)

I'm not sure if it should scale it up to the full fbwidth or WPL_16_0x100/m_HorizontalScaling.STP or similar.

Probably should do some hardware tests to check behaviour...

@skidau
Copy link
Contributor

skidau commented Sep 5, 2014

This PR fixes TMNT (SX7E52) being offset to the left when RealXFB is enabled.

@JMC47
Copy link
Contributor

JMC47 commented Sep 5, 2014

Fixes Zelda Collector's Edition GameCube NES game doubling/incorrect stretching, fixes same thing in Animal Crossing's GameCube NES games, probably some other games that I'm forgetting about that are offset or broken.

@@ -201,7 +201,7 @@ void VideoSoftware::Video_Prepare()
}

// Run from the CPU thread (from VideoInterface.cpp)
void VideoSoftware::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
void VideoSoftware::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight)
{

This comment was marked as off-topic.

This comment was marked as off-topic.

@delroth
Copy link
Member

delroth commented Sep 5, 2014

Mostly LGTM, as @booto says not sure if that's an appropriate fix, but it seems to make sense at least.

Please address that comment about the sw renderer and stride. If that's not a TODO or a bug, please add a comment in the code to explain why fbStride is not copied.

@Linktothepast
Copy link
Contributor

@JMC47 Zelda Collector's Edition is fixed only with Open gl and real xfb while with D3D it is still broken. Also https://code.google.com/p/dolphin-emu/issues/detail?id=6555&can=4 seems not affected at all, D3D has a lot of xfb issues still.

@JMC47
Copy link
Contributor

JMC47 commented Sep 5, 2014

D3D also has issues with EFB Access to CPU, likely the same problem?

@Linktothepast
Copy link
Contributor

Btw here is a pic of Zelda Collector's Edition with real xfb after this change with Zelda Collector's Edition and D3D http://prntscr.com/4jv8am. Seems like interlancing issue or something? Anyway hope it helps.

@phire
Copy link
Member

phire commented Sep 5, 2014

@Linktothepast Not interlacing, but an issue with stride being unimplemented.

Looks like this branch only implements FB stride in the OGL backend.
Both the Software and DirectX backends have FB stride unimplemented.

@JMC47
Copy link
Contributor

JMC47 commented Sep 5, 2014

This PR doesn't seem to break anything, it actually makes RealXFB work better in a ton of games. I need to actually go back through and record my examples this time >.>

@phire
Copy link
Member

phire commented Sep 5, 2014

At the very least, we need TODO comments in the software and dx backends.

@JMC47
Copy link
Contributor

JMC47 commented Sep 5, 2014

Oh yeah, the other games I found out it fixed: Animal Crossing (RealXFB had mirroring on the right side, NES games were already mentioned), Nintendo Puzzle Collection (Garbage on bottom right, mirroring on right side of screen)

I don't remember what else I found, maybe it's just games that worked on both?

@MayImilae
Copy link
Contributor

A description would be nice...

@magumagu
Copy link
Contributor

magumagu commented Sep 9, 2014

Trying to remember why this wasn't ready. If I recall correctly, there wasn't really anything wrong with it... but the data should probably get passed around in some sort of struct, and the variable names are a bit misleading because of the hack we use to read the XFB in interlaced modes.

Sonicadvance1 added a commit that referenced this pull request Sep 19, 2014
@Sonicadvance1 Sonicadvance1 merged commit af25b15 into dolphin-emu:master Sep 19, 2014
@Sonicadvance1 Sonicadvance1 deleted the xfb-scaling-rebased branch September 19, 2014 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
10 participants