Sergey Lipskiy
e72ac2ed3d
Add tile load info auxillary structure.
...
It will be used to calculate tile size.
2015-05-13 10:15:26 +06:00
Sergey Lipskiy
9f9a6952a7
Code refactor: simplify gDPLLETriangle a bit.
2015-05-13 10:15:24 +06:00
Sergey Lipskiy
b81c6edcc3
Fix WSCALE macro in gDPLLETriangle.
...
Fixed polygons distortion.
2015-05-13 10:15:20 +06:00
Sergey Lipskiy
2771d8c542
Fix crash in gDPLoadTLUT when tile.tmem is wrong.
2015-05-13 10:15:20 +06:00
Sergey Lipskiy
0b4b65f865
Fix texturing for LLE triangle.
2015-05-13 10:15:19 +06:00
Sergey Lipskiy
8b911890a4
Fix depth for LLE triangle.
2015-05-13 10:15:18 +06:00
Sergey Lipskiy
abe0ecbc2f
Remove unused code from gDPLoadBlock32.
2015-05-13 10:15:12 +06:00
Sergey Lipskiy
c079217715
Fix 32bit textures load.
...
Fixed Buck Bumble pause screen.
2015-05-13 10:14:56 +06:00
Sergey Lipskiy
0998406f25
Correct tile1 set when gSP.texture.tile = 7
2015-05-13 10:14:46 +06:00
Sergey Lipskiy
8d37143331
Implement YUV textures load.
2015-05-13 10:14:37 +06:00
Sergey Lipskiy
6961e8c810
Fix gDPSetConvert.
2015-05-13 10:14:37 +06:00
Sergey Lipskiy
f11617bfa0
Fix 32bit textures load.
2015-05-13 10:14:35 +06:00
Sergey Lipskiy
4d229824e9
Fix gDPLoadTLUT.
...
Fixed palettes load in StarCraft.
2015-05-13 10:14:35 +06:00
Sergey Lipskiy
72ba52767c
Fix depth buffer clear detection in gDPFillRectangle.
...
Automobili Lamborghini uses DEPTH_CLEAR_COLOR for pause fillrect color.
2015-05-13 10:14:34 +06:00
Sergey Lipskiy
f40ecc7a75
Fix gDPFillRectangle for cycleType != G_CYC_FILL.
...
Fixed background in C&C.
2015-05-13 10:14:31 +06:00
Sergey Lipskiy
23348b474d
Fixed PrimDepth load: only 15 bits must be used.
...
Fixed backgrounds in Space Station Silicon Valley.
2015-05-13 10:14:26 +06:00
Sergey Lipskiy
6e01ed9a34
Pass parameters to OGLRender::drawTexturedRect via special structure TexturedRectParams.
2015-05-13 10:14:21 +06:00
Sergey Lipskiy
bc1a5a1f1f
Fix frame buffer allocation again.
...
Check for all possible intersections of frame buffers address space,
remove all buffers, intersected with the new one.
2015-05-13 10:14:18 +06:00
Sergey Lipskiy
fa5d2ce544
Correct auxiliary buffers height in gDPSetColorImage.
2015-05-13 10:14:18 +06:00
Sergey Lipskiy
cdf168e469
Correct gDP.colorImage.height calculation again.
...
Fixed frame buffers overflow in V-Rally 99.
2015-05-13 10:14:17 +06:00
Sergey Lipskiy
3eb40fd30a
Fix texturedRectTextureCopy. Renamed it to texturedRectDepthBufferCopy.
2015-05-13 10:14:06 +06:00
Sergey Lipskiy
7835cfb180
Fix color image height detection for height = 1.
2015-05-13 10:14:02 +06:00
Sergey Lipskiy
268278a6b0
Implement load texture by dma offset.
...
Fixed menu in JFG.
2015-05-13 10:13:48 +06:00
Sergey Lipskiy
a8021084f2
Implement LLE triangles.
2015-05-13 10:13:43 +06:00
Sergey Lipskiy
d8a93a3aa3
Correct frame buffer height calculation.
...
Fixed Mario Tennis (E).
The RDP frame buffer height is 256, VI buffer height is 221.
The actual height of the picture is 221, so with frame buffer height 256
viewport settings becomes wrong and the picture moves atop.
2015-05-13 10:13:29 +06:00
Sergey Lipskiy
b6771dcf0a
Correct gDP.colorImage.height calculation for gDPFillRectangle.
...
Fixed SCARS.
2015-05-13 10:13:18 +06:00
Sergey Lipskiy
4aa7528915
Correct buffer's height calculation in gDPSetColorImage.
2015-05-13 10:13:16 +06:00
Sergey Lipskiy
2cfee3bc51
Revert "Fix gDP.colorImage.height in gDPTextureRectangle."
...
This reverts commit bb8800cbb163e7498b6558d8c6e059a6985edafd.
2015-05-13 10:13:15 +06:00
Sergey Lipskiy
2454f70568
Don't call gDPFillRDRAM for frame buffers created in VI_UpdateScreen(),
...
because VI_ORIGIN is not correct address of frame buffer start.
2015-05-13 10:13:12 +06:00
Sergey Lipskiy
f829a0d727
Fix gDP.colorImage.height in gDPTextureRectangle.
2015-05-13 10:13:06 +06:00
Sergey Lipskiy
2bf5c83be1
gDPFillRectangle: gDP.colorImage.height calculation for interlaced modes in G_CYC_FILL mode.
...
Fixed Turok 2, which set lry=VI.height. With lry++ frame buffer height becomes
wrong and can be deleted wrongly. That cause image flicker.
2015-05-13 10:13:06 +06:00
Sergey Lipskiy
560f1d8118
Code cleanup in gDP.
2015-05-13 10:13:04 +06:00
Sergey Lipskiy
86cde946e9
Refactor: replace C style OGL_* functions by OGLRender and OGLVideo classes.
...
OGLRender performs rendering operations.
OGLVideo initializes OpenGL and performes operations with graphics context.
It has platform-dependent implementations.
2015-05-13 10:13:00 +06:00
Sergey Lipskiy
ee4dabbfbb
Fix gDPFillRDRAM out of bounds writes.
2015-05-13 10:12:59 +06:00
Sergey Lipskiy
3352193632
Depth buffer refactor
2015-05-13 10:12:48 +06:00
Sergey Lipskiy
d7f4e44674
Frame buffer refactor.
...
Use std::list as container for frame buffers.
2015-05-13 10:12:46 +06:00
Sergey Lipskiy
bd8b73d5b5
Refactor: Make frame buffer singleton
2015-05-13 10:12:45 +06:00
Sergey Lipskiy
389a46c394
Code cleaup: fix idents, replace spaces by tabs.
2015-05-13 10:12:31 +06:00
Sergey Lipskiy
4d93ddac4f
Use std min and max
2015-05-13 10:12:30 +06:00
Sergey Lipskiy
9fda06ffa4
Fix CheckForFrameBufferTexture: don't test frame buffer content if
...
copyToRDRAM is on
or copyDepthToRDRAM is on and frame buffer was cleared by depth buffer clear value.
2015-05-13 10:12:23 +06:00
Sergey Lipskiy
4d3df31a56
Fix CheckForFrameBufferTexture(...) for depth buffer:
...
don't test frame buffer content if frame buffer is depth buffer,
because of DepthCopyToRDRAM
2015-05-13 10:12:22 +06:00
Sergey Lipskiy
4ab3c1e1ed
Fix adress correction condition in gDPSetTile.
2015-05-13 10:12:19 +06:00
Sergey Lipskiy
47d322741d
Correct condition for calling Combiner_UpdateAlphaTestInfo().
2015-05-13 10:12:08 +06:00
Sergey Lipskiy
c95bb33216
Correct frame buffer height calculation in FillRect.
...
It was broken in commit a9064e14f3a40
Mario Tennis works again.
2015-05-13 10:12:03 +06:00
Sergey Lipskiy
28133f2387
Create frameBufferEmulation section in Config.
2015-05-13 10:11:30 +06:00
Sergey Lipskiy
8018ba0aea
Move user-defined settings to Config structure.
2015-05-13 10:11:27 +06:00
Sergey Lipskiy
7c0b58cb25
Rewrite gDPTextureRectangle.
...
Code is the same for texrect and texrectFlip.
Taken from gles2n64.
2015-05-13 10:11:14 +06:00
Sergey Lipskiy
bf99ef2079
Fix colorImage.height calculation in FillRect
2015-05-13 10:11:06 +06:00
Sergey Lipskiy
7f49dd39c2
Replace frameBuffer.drawBuffer from GL_DRAW_FRAMEBUFFER
...
to gles compatible GL_FRAMEBUFFER
2015-05-13 10:11:03 +06:00
Sergey Lipskiy
c7c36ce54a
Correct frame buffer valideness check.
2015-05-13 10:10:41 +06:00