Sergey Lipskiy
46e6f3c28c
Correct VI.width calculation when hEnd is zero.
2015-05-13 10:18:40 +06:00
Sergey Lipskiy
2d099dda4c
Correct VI.real_height calculation in interlaced mode.
2015-05-13 10:18:39 +06:00
Sergey Lipskiy
b085593d2a
Major fixes in RDRAMtoFrameBuffer::CopyFromRDRAM.
...
Fixed Dr.Mario pills
2015-05-13 10:18:28 +06:00
Sergey Lipskiy
cd0ec661ba
Corrected bNeedUpdate condition in VI_UpdateScreen()
...
Fixed Quake II underwater, issue #229
2015-05-13 10:18:26 +06:00
Sergey Lipskiy
65b6de3f19
Correct VI.height calculation - make it even.
...
Fixed New Tetris work with FB on.
2015-05-13 10:18:22 +06:00
Sergey Lipskiy
27d4a73590
Correct VI.width calculation.
2015-05-13 10:18:16 +06:00
Sergey Lipskiy
b7460648be
Fix CFB detection.
...
Fixed intro logos in StarCraft64
2015-05-13 10:18:13 +06:00
Sergey Lipskiy
17b2db7031
Workaround for Mupen64Plus issue with initialization
2015-05-13 10:17:54 +06:00
Sergey Lipskiy
5b8986874a
Make VI height zero if vStart >= vEnd.
2015-05-13 10:17:07 +06:00
Sergey Lipskiy
13366a9c02
Set init value for VIInfo::lastOrigin to -1.
...
0 is valid origin value, so wrong buffer clear may occur.
2015-05-13 10:17:03 +06:00
Sergey Lipskiy
97c43d07c7
Correct VI_UpdateScreen(): avoid multiple calls of VI_UpdateSize().
2015-05-13 10:17:02 +06:00
Sergey Lipskiy
949508d652
Correct VI_UpdateSize() cast float to u32.
2015-05-13 10:17:02 +06:00
Sergey Lipskiy
1c232c6a4e
Correct VI_UpdateScreen().
2015-05-13 10:17:00 +06:00
Sergey Lipskiy
e0d71c78c0
Fix VI.width for non-interlaced mode.
...
Fixed vertical black bar in Mario Tennis.
2015-05-13 10:16:48 +06:00
Sergey Lipskiy
4a349c09d7
Fix VI height calculation again.
2015-05-13 10:16:00 +06:00
Sergey Lipskiy
e2e75a81be
Move call to VI_UpdateSize() from RSP_ProcessDList() to VI_UpdateScreen().
2015-05-13 10:15:59 +06:00
Sergey Lipskiy
698f49ed40
Move VI_UpdateSize() from RDP_ProcessRDPList() to VI_UpdateScreen()
...
in order to avoid too often calls of that function.
2015-05-13 10:15:23 +06:00
Sergey Lipskiy
01fc74b3c9
Workaround for Mupen64Plus issue with initialization.
2015-05-13 10:15:23 +06:00
Sergey Lipskiy
3e65749241
Don't fix zero VI.width and VI.height
...
If these values are zero, it is for purpose.
Fixed depth buffer write in PD intro.
2015-05-13 10:14:12 +06:00
Sergey Lipskiy
92c3283ff7
Fix min and max usage.
2015-05-13 10:13:38 +06:00
Sergey Lipskiy
f637e91f22
Replace _SHIFTR( *REG.VI_H_START, 0, 10 ) == 0 check by VI.width == 0 one
...
Fixed glError in Knockout Kings 2000. The game sets h_start==h_end at start,
thus VI.width is zero but *REG.VI_H_START is not.
2015-05-13 10:13:32 +06:00
Sergey Lipskiy
75bf4004cb
Correct VI width calculation.
...
Fixed VI width in Cyber Tiger.
2015-05-13 10:13:32 +06:00
Sergey Lipskiy
ebedf49240
Correct VI height calculation.
2015-05-13 10:13:30 +06:00
Sergey Lipskiy
3b97ca2d7c
Fix float/int mismatch in VI_UpdateSize().
2015-05-13 10:13:28 +06:00
Sergey Lipskiy
c96b62adaf
Implement window resize for MupenPlus.
2015-05-13 10:13:24 +06:00
Sergey Lipskiy
5ac66b83fe
Clear frame and depth buffers lists when VI width, height or interlaced mode is changed.
2015-05-13 10:13:17 +06:00
Sergey Lipskiy
9305d46c94
Roundup calculated VI.width and VI.height.
...
Fixed Charlie Blast.
2015-05-13 10:13:16 +06:00
Sergey Lipskiy
fb1a28c6db
Clear frame and depth buffers lists when interlace mode is changed,
...
because new mode makes old buffers invalid.
2015-05-13 10:13:13 +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
4a568c984d
Change VI height correction constant for PAL games.
...
Fixed Armorines (E).
2015-05-13 10:13:12 +06:00
Sergey Lipskiy
5eac0797f0
Remove VI emulation code, which can't be tested for now.
...
Star Wars Ep. 1 Racer (E) is fixed.
2015-05-13 10:13:11 +06:00
Sergey Lipskiy
c0e0df2551
Fix allocation of new frame buffer in VI_UpdateScreen().
...
Need to compare buffer width with calculated VI.width, not with *REG.VI_WIDTH.
This fixes wrong allocations in Star Wars Ep.1 Racer.
2015-05-13 10:13:10 +06:00
Sergey Lipskiy
c551230a8e
Double VI.height in interlaced mode when yScale = 1.
...
This fixes frame buffer height for Star Wars Ep.1 Racer.
Not sure that this solution is correct!
2015-05-13 10:13:09 +06:00
Sergey Lipskiy
400f674409
Revert VI.height calculation. Add flag VI.interlaced for interlaced mode.
2015-05-13 10:13:05 +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
54ef6f2d0c
Don't save frame buffer with zero width.
2015-05-13 10:12:55 +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
ee57f6ef47
Move frame buffer emulation options to Config.
2015-05-13 10:11:30 +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
3f72a7aefc
Add reverse width and height to VIInfo.
2015-05-13 10:11:15 +06:00
Sergey Lipskiy
1711da98ae
Correct VI.height calculation.
...
In case of interlaced mode both half-fields are used and thus all half-lines
must be taken into account.
2015-05-13 10:11:12 +06:00
Sergey Lipskiy
3b06773f43
(R): Rewrite OGL_SwapBuffers() and use it for all platforms.
2015-05-13 10:10:53 +06:00
Sergey Lipskiy
4635e24d62
Add g_bIgnoreCFB option.
...
It is necessary for Zelda Pause Screen, otherwise it will be
replaced by blank data from RDRAM.
2015-05-13 10:10:40 +06:00
Sergey Lipskiy
d4953abb91
Fix depth beffer rendering.
...
Corrected bug with Z calculation in depth_compare_shader.
2015-05-13 10:10:37 +06:00
Sergey Lipskiy
9b8b667fab
Implement CopyDepthBuffer to RDRAM.
2015-05-13 10:10:36 +06:00
Sergey Lipskiy
f151ef36ca
Add shadow map shader
2015-05-13 10:10:28 +06:00
Sergey Lipskiy
c47ab51175
Add depth compare shader to the main program.
2015-05-13 10:10:25 +06:00
Sergey Lipskiy
5cedc0e6e7
Implement VI emulation: treat main frame buffer as TV screen and render
...
FBO buffers on it according to VI registers values.
2015-05-13 10:10:11 +06:00
Sergey Lipskiy
4e39f37a34
Increase CFB mode frames limit
2015-05-13 10:10:10 +06:00