Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Baldurs Gate Half screen explained
#1
I finally got to the bottom of this - so I know why it happens, but not really how to fix it Smile

BGDA renders everything to a 1280 x 1024 buffer located at 0xA0000 in GS memory. It then transfers that to the display buffer at address 0 for display each frame. The display buffer is 640 x 512 on the pal version.
Now, the problem it has is that a source texture has a maximum width of 1024 pixels and it has a source of 1280 ... so it uses a trick.
It sets a TEX0 at 0xA0000 and transfers a 640 x 1024 section of that to (in the pal version) a 320 x 512 area in the display buffer. This is the 'half screen' that we see. To do the right hand side of the screen, it sets TEX0 to 0xB4000 and does the same thing only shifted right by half a screen in the destination. 0xB4000 is pixel 640 of the texture at 0xA0000.
In software mode this is fine. For hardware mode though, we see the texture at 0xb4000 as a different texture rather than simply an offset into 0xA0000 ... so we get a blank texture for the right hand side and hence the bug.

For those thinking that 0xB4000 is not half a scan into 0xA0000, you need to remember that the GS memory is not liner but swizzled in square blocks of pixels.

Ian

Sponsored links

#2
Thanks for the find, I bet this would fix all Snowblind games.

Hopefully a Dev can make sense of this and we can get those games working. Man have i wanted to play in HD glory haha
Intel Core i5-4690k @4.5ghz
Samsung 16GB DDR3 @2000mhz
GeForce GTX 1080 8GB
Windows 10 x64
#3
(04-07-2014, 06:56 PM)hellbringer616 Wrote: Man have i wanted to play in HD glory haha

An interesting hack / patch would be to just display the frame texture at 0xA0000. That's native 1080p resolution which would be quite nice.
#4
Many thanks for this nice explanation. I've forwarded it so hopefully we can come up with a render fix Smile
#5
+1 for this info. Maybe Snowblind engine games will finally be decent in HW mode.
#6
(04-07-2014, 09:20 PM)rama Wrote: Many thanks for this nice explanation. I've forwarded it so hopefully we can come up with a render fix Smile

to who do you forward such a thing?
#7
Pseudonym is our main guy to go to with GSdx stuff Tongue2
#8
Ian you are my hero. Excellent work Laugh
#9
That's beautiful.

I wonder if this is being worked on xD
#10
(04-07-2014, 06:56 PM)hellbringer616 Wrote: Thanks for the find, I bet this would fix all Snowblind games.

Hopefully a Dev can make sense of this and we can get those games working. Man have i wanted to play in HD glory haha

Exactily,i think the same.Smile




Users browsing this thread: 1 Guest(s)