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

141 Commits

Author SHA1 Message Date
Logan McNaughton
85a8635952 Update to XXH3 for CRC_OPT 2020-03-30 21:16:59 +07:00
Sergey Lipskiy
028133bb5c Correct gDP.loadTile->loadHeight calculation again.
Fixed #2143 Yoshi's Story level backgrounds regression
which was broken by b261f34b0
2019-11-30 22:48:23 +07:00
Sergey Lipskiy
89bcb61c02 Correct frame buffer usage check.
Fixed Pokémon Stadium 2 - Cut off pokémon portraits #2110
2019-11-22 16:23:25 +07:00
Sergey Lipskiy
b261f34b0d Fix gDP.loadTile->loadHeight calculation.
Fixed Zelda 64 Skybox duplicates #2094.
2019-10-13 13:03:28 +07:00
Sergey Lipskiy
86a227308e Implement copy depth to main depth buffer. It is necessary for correct work of some Reshade shaders. 2019-09-27 19:33:18 +07:00
Sergey Lipskiy
c28ea61b8f Fix for texture issues in Stunt Racer, reported by DonelBueno in #1885
Stunt Racer uses combiner with two textures for track polygons, but actually loads only T0.
T1 replaced by T0 because of LOD flags in othermode.
This situation was not checked in the main code and ClampWrapMirror shader got wrong parameters,
which lead to the glitches.
2019-08-16 19:10:09 +07:00
Sergey Lipskiy
2d712f2ae0 Rewrite textures loading and mapping:
- use RiceVideo method for texture size calculation.
  RiceVideo uses the same method for texture dumping.
- rewrite texture mapping.
  Texture Clamp-Wrap-Mirror implemented in shaders.

Problem explanation:
https://github.com/gonetz/GLideN64/issues/1885#issuecomment-485136358

Fixed various glitches with HD textures, #1885
2019-06-19 19:02:52 +07:00
Sergey Lipskiy
3d74542d24 Correct geometry mode update for Turbo3D.
Fixed glitches in Dark Rift, #2033
2019-04-03 21:32:50 +07:00
Sergey Lipskiy
c57909e2e9 Reset gSP.geometryMode at display list load and display list end.
Fixed culling issue in Triple Play 2000.
2019-04-01 15:21:08 +07:00
Sergey Lipskiy
751fe2b3fa Convert fix for StarCraft 64 from commit 729bf94c5 to StarCraft specific hack,
because that case is actual for StarCraft 64 only.
2019-03-23 12:33:04 +07:00
Sergey Lipskiy
2b7f78c9f8 Fix depth buffer clear when otherMode.depthCompare enabled.
Fixed 1080 Snowboarding (JU) FB off breaks games ( regression) #1976
2019-02-03 18:01:01 +07:00
Sergey Lipskiy
f79f8d406a Add bgMode config setting. 2019-02-02 19:10:50 +07:00
Sergey Lipskiy
729bf94c5a StarCraft fix. 2019-02-02 18:34:10 +07:00
Sergey Lipskiy
2decda55f3 CheckForFrameBufferTexture code refactor. 2019-02-02 18:34:10 +07:00
Sergey Lipskiy
c48e0e4d00 Fix loadblock when lrs = 0xFFF 2019-02-02 18:34:10 +07:00
Sergey Lipskiy
aab318b4f7 Fix tile load for BG commands. 2019-02-02 18:34:08 +07:00
Sergey Lipskiy
9ac633d2ea Add originalMaskT, originalMaskS fields for struct gDPTile.
masks and maskt set by gDPSetTile, but _calcTileSizes may change them if actual
tile dimension do not correspond the mask. This creates problem for S2DEX_BG_1Cyc command,
which set tile masks and maskt to maximum, while actual size of loaded tiles may vary.
_calcTileSizes may set new values for masks and maskt, which are valid for the current tile but invalid for next ones.
Thus, original values of tile masks and maskt must be restored when tile size calculated again in _calcTileSizes.
2019-02-02 18:34:08 +07:00
Sergey Lipskiy
fa2b0793e0 Store integer scissor coordinates. 2019-02-02 18:34:08 +07:00
Sergey Lipskiy
fc70172327 Refactor update of buffer end address.
Add removeIntersections() after end address update.
2019-01-13 00:40:21 +07:00
Sergey Lipskiy
0d3c3c151d Correct reject box implementation: add special flag for it in gDP.changed flags.
Fixed Rejection process issues #1954
2018-12-09 16:49:23 +07:00
Sergey Lipskiy
fe6447070e Minor code refactor in gDPFillRectangle 2018-10-17 15:52:53 +07:00
Sergey Lipskiy
57ad2e96c6 Fix DepthBufferList::clearBuffer() for image textures. 2018-10-17 15:52:53 +07:00
Sergey Lipskiy
9a2a77982b Set gDP.colorImage parameters before frameBufferList().saveBuffer call. 2018-10-17 15:52:53 +07:00
Sergey Lipskiy
1df96cebeb Enable clearDepthBuffer for Pokemon Snap.
Fixed Pokemon Snap Oak's check does not work #777 again

Note: this game is a mistery. I don't understand,
why clearing of depth buffer via drawRecs breaks Oak's check.
Actually, the problem causes rendering to color buffer corresponding to that depth buffer.
Need to investigate, why.
2018-10-07 00:15:01 +07:00
Sergey Lipskiy
423fc7ba3e Code cleanup in gDPFillRectangle 2018-10-06 13:43:14 +07:00
Sergey Lipskiy
4f302cc777 gDPFillRectangle: call frameBufferList().fillRDRAM for color buffers in FILL mode.
Fixed Vigilante 8 Menu and In-game issues. #1917
2018-10-02 17:06:07 +07:00
Sergey Lipskiy
9f1bbeab9f Rewrite primitive depth calculation.
Up shader storage version.

Fixed Star Wars Episode I - Racer: Overlapping #1911
2018-10-01 22:37:03 +07:00
Sergey Lipskiy
5e1c8a6b58 Do not use clearDepthBuffer in FillRect. Use drawRect only. 2018-09-24 22:02:25 +07:00
Sergey Lipskiy
6a7c64dd6b Do not use clearColorBuffer in FillRect. Use drawRect only.
Fixed Twisted Edge Extreme Snowboarding P1 broken #1873
2018-09-24 20:33:15 +07:00
Sergey Lipskiy
e65f8bd68d Weaken condition for invalid frame buffer texture.
Fixed text in Mario Tennis scoreboard.
2018-09-16 22:15:28 +07:00
Sergey Lipskiy
fef718b8d2 Do not reject tile loading when tile end address is out of RDRAM bound.
Try to load as much as possible instead.

Fixed Bust-A-Move 2 wrong 2D during intro #870
2018-09-07 21:08:37 +07:00
Sergey Lipskiy
83e1ccb72e Remove hack for Banjo-Tooie Groggy Crash #1250 added in 8fbd1d030b
Writes to TMEM protected by masking TMEM write address, so it is not necessary anymore.
Rearrange the code a bit.

Fixed NBA Live 99 messed up textures #1826
2018-09-05 23:20:27 +07:00
Sergey Lipskiy
c53bf689e1 Correct calculation of bytes for 32bit textures in gDPLoadTile
Fixed 1080 Snowboarding title logo regression #1824
2018-09-05 17:23:23 +07:00
Sergey Lipskiy
cec0f2fc05 Update end address of the current frame buffer in gDPFullSync().
Fixed Ogre Battle 64 Opening Splash Screens Flicker. #1868

Details

Problem: frame buffer end address set to minimal when buffer is allocated.
It is updated on next call of gDPSetColorImage.
In case of Ogre Battle 64 Opening next call of gDPSetColorImage occurs in next frame.
VI can't find the buffer because REG.VI_ORIGIN points on buffer with some offset,
which in this case is larger than diff between start and end address.
VI allocates new buffer, which eventually replaces the current one and flickering happens.

Solution: update current buffer's end address in gDPFullSync()
to ensure that it will be correct at the moment when VI will search for buffer to draw.
2018-08-28 16:07:31 +07:00
Sergey Lipskiy
d4b770b2c1 Correct texrect dsdx calculation in COPY mode.
Partially fixes issue with the energy bar in F-Zero multiplayer, #1849
2018-07-02 19:24:18 +07:00
Sergey Lipskiy
2322f5f53f Implement Overscan feature.
Remove Crop feature.
Change settings save-load when "per game settings" enabled:
    * When config dialog opens, show custom settings for the running game. If no game run yet, show main settings.
    * When user press OK button, save settings to the custom ini file and to the main ini file.
2018-06-17 20:04:45 +07:00
gizmo98
4750e10076 Use _FIXED2FLOATCOLOR 2018-06-02 21:35:32 +07:00
Sergey Lipskiy
6725ad474a Fix warnings of 64bit compiler. 2018-05-06 15:54:12 +07:00
Sergey Lipskiy
7080034ddb Fix DebugMsg format string for gDPTextureRectangle. 2018-02-18 12:43:04 +07:00
Sergey Lipskiy
4bdc44ce4e Code cleanup: fix cast from float to s16. 2017-12-16 13:15:57 +07:00
Sergey Lipskiy
26623cec1f Code cleanup: fix issues in GLideN64 found by static code analyser. 2017-11-18 22:07:27 +07:00
Sergey Lipskiy
737338ca20 Use fixed point calculation for texrect s and t coordinates.
It is impossible to handle integer overflow when coordinates in float format.

Fixed textures in Major League Baseball #146
2017-11-18 15:41:18 +07:00
Sergey Lipskiy
29c9a778d9 Correct debug output 2017-11-16 18:52:32 +07:00
Sergey Lipskiy
ddec7aabe6 Revert "Do not use aux depth buffer as hwfbe texture."
This reverts commit bd10c7a788.
2017-11-16 18:32:05 +07:00
Sergey Lipskiy
5a037474a2 Code cleanup: fix compilation warnings. 2017-11-15 15:07:52 +07:00
Sergey Lipskiy
184debbd43 Fix gDPLoadTLUT when count > 256
Fixed crash in Vigilante 8: 2nd Offense Menu #1479
2017-11-01 17:45:24 +07:00
Sergey Lipskiy
adc2b547e8 Implement YUV-to-RGB color space conversion. See 12.5 of programming manual
Up shader storage version.

Fixed Killer Instinct Gold: Improper Projectile Effects. #1513
2017-10-31 13:27:34 +07:00
Sergey Lipskiy
77ffe6106e Split othermode::textureConvert on 3 bits. 2017-10-31 13:27:34 +07:00
Sergey Lipskiy
757c3c4f8f Calc FPS as number of color buffer origin changes per second.
Fixed FPS counter not reporting correctly #1510
2017-10-30 15:33:38 +07:00
Sergey Lipskiy
bd10c7a788 Do not use aux depth buffer as hwfbe texture.
Fixed black polygons in vigilante 8,  #1639
2017-10-24 20:36:14 +07:00