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

128 Commits

Author SHA1 Message Date
Sergey Lipskiy
25aa8889a8 Do not use 8bit CI frame buffer as texture for gSpBg commands.
Fixed Yoshi's Story black screen in some levels if frame buffer is enabled #1143

Problem:
The game draws background with BG command.
Background texture is 8bit CI.
For some reason the game set 8bit CI at the address of the
background texture, but renders nothing to it.
Plugin uses empty frame buffer texture instead of background texture.

Solution: Do not use 8bit CI frame buffer as BG textures.

Note: probably the game rendres something to the BG texture at some point
of the game. This can't be emulated in hardware anyway.
2016-09-28 22:29:45 +07:00
Sergey Lipskiy
d6dbfad902 Correct fix for #977 2016-09-23 10:57:44 +07:00
Sergey Lipskiy
38ff9e97d5 Reset texture mode to normal in gSPSetSpriteTile.
Fixed Nushi Zuri 64 incorrect gfx #977
2016-09-22 20:50:51 +07:00
Sergey Lipskiy
91f03c70bc Use dmaVertices when draw with drawScreenSpaceTriangle. 2016-09-21 15:24:15 +07:00
Sergey Lipskiy
77d0c9aada Code refactor: rename drawLLETriangle to drawScreenSpaceTriangle. 2016-09-20 16:21:54 +07:00
Sergey Lipskiy
e28bebd17e Add validity check for background fb textures.
Fixed Nushi Zuri 64: fb background doesn't work anymore #1115

Problem: The game normally uses color and depth buffers.
When it needs to show rectangle with text, CPU copies current color buffer
by depth buffer address. This buffer rendered as background, text rendered over.
Plugin detects buffer usage and tries to use depth buffer as background texture.
That buffer in video memory has no color information, because data copied by CPU and contained in RDRAM.

Solution: check that found frame buffer is valid.
In this case validity check will fail because RDRAM content modified by CPU,
and background will be read from RDRAM.
2016-09-16 17:09:25 +07:00
Sergey Lipskiy
1a5e971eea Minor code cleanup in gSPModifyVertex. 2016-09-02 11:05:38 +07:00
Francisco Zurita
b81fb23363 Fix CBFD lighting in Android 2016-08-16 22:07:51 +07:00
Sergey Lipskiy
c7c90cb7eb Add widescreen hack support to gSPProcessVertex4
Fixed Widescreen hack broken #1078
2016-08-04 12:25:07 +07:00
Francisco Zurita
51b8547eba Fix __VEC4_OPT issue for CBFD in gSPCBFDVertex.
This fixes incorrect lighting with VEC4_OPT enabled in CBFD.
2016-07-20 01:45:11 -04:00
Francisco Zurita
7386a036ce Port glN64 for Android NEON optimizations 2016-07-06 11:00:40 +06:00
Sergey Lipskiy
c816f7deeb Code refactor: rename CLIP_Z to CLIP_W 2016-06-20 15:12:31 +06:00
Sergey Lipskiy
86fbea9edc Code refactor: replace NULL by nullptr. 2016-06-10 12:40:18 +06:00
Sergey Lipskiy
8ab1ca7468 Code refactor: replace hack_skipVIChangeCheck and hack_ZeldaCamera by one hack_ZeldaMM 2016-05-08 16:58:21 +06:00
Sergey Lipskiy
cfc7f25e1a Fix typo in gSPProcessVertex4 2016-05-05 16:28:53 +06:00
Sergey Lipskiy
bea7adf4b3 Add a hack for Jeremy McGrath Supercross 2000 jauge line, see #274
Fixed issue #942
2016-03-29 22:21:52 +06:00
Sergey Lipskiy
8673e9382c Correct gSPModifyVertex for POINT_XYSCREEN.
Fixed tarzan: gfx are completely wrong (regression) #939
2016-03-28 22:02:12 +06:00
Sergey Lipskiy
38bc2145d2 Do not set MODIFY_ST in gSPModifyVertex.
Fixed South Park - Chef's Luv Shack: incorrect gfx (regression) #942
2016-03-27 10:38:11 +06:00
Sergey Lipskiy
7875b6057f Detect microcodes, where texture perspective correction is always enabled.
Fixed Quake 64 HLE incorrect particles. #637
2016-03-23 22:15:19 +06:00
Sergey Lipskiy
3c675b1cfb Do not draw Sprite2D when sprite->stride <= 0.
Fixed crash in Super Robot Spirits: Crash rankings option in HLE. #909
2016-03-20 17:43:12 +06:00
Sergey Lipskiy
80c954e5cc Move modify_vtx transformations to vertex shader.
Fixed Jeremy McGrath Supercross 2000: missing jauge line in menu #274
This game sets coordinates of lines vertices via modify_vtx.
modify_vtx set screen coordinates for the vertex.
Screen coordinates must be converted back to normalized device coordinates (NDC)
to apply viewport transformation. Unfortunately, the screen coordinates set are out of current viewport
and just clipped after transformation to NDC coordinates and viewport transformation.
Solution: use fullscreen viewport for modified vertex coordinates and
transform coordinates according to this viewport.
2016-03-19 14:02:57 +06:00
Sergey Lipskiy
7549e04157 Move calculations from drawLLETriangle to vertex shader. 2016-03-19 14:02:49 +06:00
Sergey Lipskiy
24885907d8 Add hack_ZeldaCamera to fix camera in Zelda MM, #577
The game copies current frame buffer to the area, which initially allocated for depth buffer.
Game read camera data from that area, not from normal frame buffer.
That's why 'copy color buffer to RDRAM' option does not help there.
Special code needed to process that. Looks ugly, but works.
2015-09-27 10:10:05 +06:00
Sergey Lipskiy
a3f9b43b4a Disable _copyDepthBuffer() for GLES2 only. 2015-09-26 22:36:25 +06:00
Sergey Lipskiy
27c4cccd81 Code refactor in _copyDepthBuffer(). 2015-09-26 22:13:49 +06:00
Sergey Lipskiy
4a75d4d357 Add hack to fix both mario 64 and mario kart 64 background (blue sky) with widescreen hack enable.
Author: Gillou68310
2015-06-26 22:06:06 +06:00
Sergey Lipskiy
2525b86f49 Implement "widescreen hack". 2015-05-13 10:21:43 +06:00
Sergey Lipskiy
52d68d1389 Move all sources to src folder. 2015-05-13 10:21:32 +06:00