1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00
Commit Graph

107 Commits

Author SHA1 Message Date
Sergey Lipskiy
4a9e7cdc1f New FB validity check based on checksum of RDRAM content. 2015-05-13 10:19:14 +06:00
Sergey Lipskiy
1e5b7def3d Replace DEPTH_CLEAR_COLOR constant by game dependant variable.
Several games use non-standart value for depth buffer clear.
This value must be known beforehand for correct emulation.

Fixed NFL Quarterback Club 2000: gfx screwed up #148
2015-05-13 10:19:02 +06:00
Sergey Lipskiy
503612b99e Fix tile load when it is out of TMEM.
Fixed texture load in Bomberman 64 - The Second Attack, #122
2015-05-13 10:18:58 +06:00
Sergey Lipskiy
88e751b13b Implement FBO height correction. Fixed replays in 1080. 2015-05-13 10:18:54 +06:00
Sergey Lipskiy
1b2b9f9865 Replace gDP.colorImage.changed by FrameBuffer::m_changed 2015-05-13 10:18:53 +06:00
Sergey Lipskiy
eb42f8fe46 Code cleanup: remove unused gDP.texRect struct and related code. 2015-05-13 10:18:50 +06:00
Sergey Lipskiy
f266e91981 Remove textures coordinates swap in case of lower coordinate is larger than higher one.
It is legacy code. Not sure which issue it intended to fix.
2015-05-13 10:18:49 +06:00
Sergey Lipskiy
bc34838db6 Fix pause screen in Conker BFD.
How it work:
- content of previous main frame buffer is copied into depth buffer area.
- CPU applies blur to th eimage in depth buffer area.
- Depth buffer is used as background texture for pause screen.

Solution:
1. Do not use depth buffer FBO as texture. Image must be load from RDRAM.
2. If current color image is depth image and previous color buffer is used as
texture for it, copy content of color image in RDRAM to depth image area.
2015-05-13 10:18:45 +06:00
Sergey Lipskiy
d06befb4eb Add a hack for Mario Golf replays.
Replays works only if depth buffer FBO is NOT used as texture
because CPU copies color frame buffer for replays into depth buffer area.
Pause screen in Zelda OOT is copied into depth buffer area and it works only
id depth buffer FBO IS used as texture. Thus it is impossible to write general code
for both situations.
2015-05-13 10:18:42 +06:00
Sergey Lipskiy
3c9ad5f730 Correct frame buffer - texture bounds intersection check.
Fixed bottom of background image in Dr.Mario
2015-05-13 10:18:29 +06:00
Sergey Lipskiy
6f40fa430b Fix frame buffer content check in CheckForFrameBufferTexture.
Frame buffer area is cleared in FrameBufferList::saveBuffer.
If scissor does not equal to frame buffer size, clear is incorrect.
Solution: clear frame buffer area without scissoring.

Fixed background in Dr.Mario
2015-05-13 10:18:26 +06:00
Sergey Lipskiy
b353028969 Fixed fillrect drawing. 2015-05-13 10:18:24 +06:00
Sergey Lipskiy
f946a82e38 Fix replay in Mario Golf:
replay is copied to a area, which is used for depth buffer.
Added check that found frame buffer is not depth buffer.
2015-05-13 10:18:24 +06:00
Sergey Lipskiy
d6b6204959 Code cleanup in gDPSetColorImage 2015-05-13 10:18:13 +06:00
Sergey Lipskiy
0197bfa104 Correct depth_compare_shader.
Add primDeltaZ support.
2015-05-13 10:17:16 +06:00
Sergey Lipskiy
626fdf8f2f Fix texture bytes calculation for CheckForFrameBufferTexture in gDPLoadTile.
Fixed last rects of pause screen Banjo Tooie.
2015-05-13 10:17:06 +06:00
Sergey Lipskiy
163d8a1505 Code cleanup in gDPLoadTile. 2015-05-13 10:16:55 +06:00
Sergey Lipskiy
d55c95d671 Fix gDPLoadTile: fixed bytes per line calculation.
Fixed Scars: wrong sky #200.
2015-05-13 10:16:54 +06:00
Sergey Lipskiy
6e3c1ec76f Skip degenerate rects.
Fixed scars europe: wrong position bar in game #221
2015-05-13 10:16:54 +06:00
Sergey Lipskiy
7cabb325ba Correct bytes calculation in loadblock broken in commit fd6a64997. 2015-05-13 10:16:40 +06:00
Sergey Lipskiy
8b7106ed38 Fix gDPSetPrimDepth for the case when viewport is not set.
Fixed logos in Mario Tennis.
2015-05-13 10:16:37 +06:00
Sergey Lipskiy
1bdc3cb1ed Rewrite SetOtherMode_H and SetOtherMode_L.
Fixed Paper Mario.
2015-05-13 10:16:36 +06:00
Sergey Lipskiy
40d99fd9ca Ignore degenerate texrects.
Fixed issues in Daikatana and Rat Attack.
2015-05-13 10:16:31 +06:00
Sergey Lipskiy
fbefc49c15 Fix bytes calculation in loadblock.
Fix Bettle adv racing: incorrect shadow project for map in menu #100
2015-05-13 10:16:29 +06:00
Sergey Lipskiy
9408d4b16d Fix gDPSetPrimDepth(). Z is in range [-1, 1]; 2015-05-13 10:16:28 +06:00
Sergey Lipskiy
aafebd1676 Fix depth problem in Elmo's Letter Adventure and Taz Express.
issue #155
2015-05-13 10:16:17 +06:00
Sergey Lipskiy
337f0f1bf1 Fix gDPLoadTileInfo fill in gDPLoadTile and gDPLoadBlock. 2015-05-13 10:16:13 +06:00
Sergey Lipskiy
59869483fc Fix texrect flip. 2015-05-13 10:16:09 +06:00
Sergey Lipskiy
048a1576fb Set minimal texrect height to 1.0
Fixed horisontal strips in GE intro background taxtures, #157
2015-05-13 10:16:08 +06:00
Sergey Lipskiy
89250a0751 Fix fillrect when gamma correction is on. 2015-05-13 10:15:59 +06:00
Sergey Lipskiy
c984298b7b Implement search for hires texture. WIP 2015-05-13 10:15:41 +06:00
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