Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Source/gs/GSH_OpenGL/GSH_OpenGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,12 @@ void CGSH_OpenGL::SetRenderingContext(uint64 primReg)
m_nPrimOfsX = offset.GetX();
m_nPrimOfsY = offset.GetY();

// Account for the fact that PS2 assumes the pixel center at the bottom left,
// but OpenGL at the center of the screen. On even resolutions this causes a slight
// discrepancy.
m_nPrimOfsX -= 0.5f;
m_nPrimOfsY -= 0.5f;

CHECKGLERROR();

m_renderState.isValid = true;
Expand Down
3 changes: 3 additions & 0 deletions Source/gs/GSHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,9 @@ void CGSHandler::WriteRegisterImpl(uint8 nRegister, uint64 nData)

switch(nRegister)
{
case GS_REG_ST:
m_nReg[nRegister] &= 0xFFFFFF00FFFFFF00;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These (ST) are floating point values. Does it makes sense to mask out the last 8 bits of these values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, thats what the GS manual explicitly states.

break;
case GS_REG_TEX0_1:
case GS_REG_TEX0_2:
{
Expand Down