Sergey Lipskiy
6041b47271
Fix Insert Matrix moveword command.
...
Fixed Sim City 64 HLE City Rendering Issue #1200
2019-03-11 22:10:28 +07:00
Sergey Lipskiy
76a56b4273
Fix gSPModifyVertex for Z coordinate.
...
Fixed gasp: wrong depth in menu #2019
2019-03-07 12:09:26 +07:00
Sergey Lipskiy
31e2c7e11a
Correct lighting for CBFD.
...
Code refactoring.
2019-01-13 01:07:20 +07:00
Sergey Lipskiy
6135aa9de1
Activate hack for WCW Nitro backgrounds.
...
Currently it is impossible to draw them without hack.
Fixed WCW Nitro: the mysterious wrong textures #179
2019-01-13 00:38:10 +07:00
Sergey Lipskiy
dcbea90e76
Correct _loadSpriteImage: if bg image address is inside cfb buffer, remove that buffer.
2019-01-13 00:38:06 +07:00
Sergey Lipskiy
bb8c13ccce
Implement rejection processing, see 25.3.2 of programming manual
...
Fixed Mario Party: Coin Block Blitz ground flicker / darkening #1912
2018-12-06 17:31:50 +07:00
Sergey Lipskiy
cbf5821f8e
Clamp arguments for acos when calculating G_TEXTURE_GEN_LINEAR
...
Fixed (Majora's Mask) Glass in Postman House not rendering #1941
Note: ucode actually works a bit differently because it uses approximated acos calculation.
2018-11-20 22:47:59 +07:00
Sergey Lipskiy
7aa360c900
Clear fog parameters in gSPLoadUcodeEx.
...
Fixed Zelda OOT wrong fog [HLE] #640
2018-11-03 15:40:41 +07:00
gizmo98
13f587a360
tile functions: Replace magic numbers with constants
...
Just refactoring. Replace magic numbers with constants. No functional
changes.
2018-09-30 18:03:46 +07:00
Sergey Lipskiy
b012e8b53c
Code refactor:
...
* move implementation of S2DEX commands from gSP.cpp to uCodes/S2DEX.cpp
* code cleanup
2018-09-30 18:03:44 +07:00
Sergey Lipskiy
9192a82905
Rewrite vertex coordinates calculation for gSPObjRectangle using fixed-point math decoded from S2DEX ucode by olivieryuyu
...
Code refactoring.
2018-09-30 18:03:44 +07:00
Sergey Lipskiy
7d75b99705
Rewrite gSPObjSprite using fixed-point math decoded from S2DEX ucode by olivieryuyu
2018-09-30 18:03:44 +07:00
Sergey Lipskiy
cf05918222
Revert "Shift sprite origin Y by -0.5"
...
This reverts commit 43e0ad500f
.
2018-09-30 18:03:43 +07:00
gizmo98
d4cce52c60
Rewrite ObjCoordinates(const uObjScaleBg * _pObjScaleBg)
...
gSPBgRect1Cyc() and gSPBgRectCopy() use ObjCoordinates(const
uObjScaleBg * _pObjScaleBg).
This modification fixes bad texture quality in following games:
-Bakuretsu Muteki Bangaioh
-Nintama Randou
-Starcraft
-Command & Conquer
-SD Hiryuu noKen Densetsu
https://github.com/gonetz/GLideN64/pull/1878
2018-09-07 21:25:44 +07:00
Sergey Lipskiy
43e0ad500f
Shift sprite origin Y by -0.5
...
Fixed Parlor! Pro 64 #133
2018-08-12 16:27:40 +07:00
gizmo98
59ad164258
ObjCoordinates: Implement G_OBJRM_BILERP
...
-Rewrite lrx, ulx, lry, uly, lrs, uls, lrt, ult calculation
-Implement SHRINKSIZE according to programmers guide
-Implement G_OBJRM_BILERP according to programmers guide
-Worms Armageddon: Menu items, 2D elements and worms are sharp
-Kirby Crystal Shards: Menu is sharp
2018-08-04 20:36:54 +02:00
gizmo98
c76daedfc0
Fix Worms Armageddon
...
Rewrite
https://github.com/gonetz/GLideN64/commit/feb0e53034d54095464687dbae1785
4c9dc3caa6 to fix Worms Armageddon. If upper left value is zero lower
right value is scaled width minus one scaled texel.
Example:
Width = 10.0f, scale is 1.0f
urx = 0.0f;
lrx = 0.0f + 10.0f/1.0f - 1.0f/1.0f = 9.0f
Resulting range is 0-9 for a 10 texel width texture.
2018-08-03 17:15:24 +07:00
gizmo98
a6adf6308d
gSPInsertMatrix: fix insert fractional part if old value is negativ
...
s32 integer = static_cast<s32>(-2.5f) = -2
GetFloatMatrixElement(static_cast<s16>(integer), 0x44) = -1,9993286030
Fix:
s32 integer = (-2.5f * 65535.0f) >> 16 = (163837) >> 16 = -3
GetFloatMatrixElement(static_cast<s16>(integer), 0x44) =
-2,999008163576715
2018-07-22 19:58:22 +07:00
Sergey Lipskiy
b0a575313a
Implement Factor5 ucodes for Indiana Jones/Battle of Naboo, task #1259
2018-06-16 18:41:50 +07:00
Sergey Lipskiy
3ff1478103
Add matix element conversion functions.
2018-06-11 20:12:13 +07:00
gizmo98
95d5264300
Add better matrix load, insert and store fixed to float logic
2018-06-09 12:29:01 +02:00
gizmo98
35f4ad3b28
gSP.cpp: Replace _FIXED2FLOAT if there is no real fixed to float conversion
...
Use * recip instead
2018-06-02 21:35:32 +07:00
gizmo98
4750e10076
Use _FIXED2FLOATCOLOR
2018-06-02 21:35:32 +07:00
gizmo98
bb00ed3f4f
gSPInsertMatrix remove (int) cast and use copysignf
...
Fraction value gets lost if float is cast to int. Use copysignf to
transfer sign from fraction to newvalue.
2018-06-02 21:35:32 +07:00
gizmo98
a8349418ce
Use _FIXED2FLOAT
...
Replace x/65536 and x*0.00390625f with _FIXED2FLOAT
2018-06-02 21:35:32 +07:00
Logan McNaughton
e80577e105
Allow non-0 default framebuffer
2018-05-22 08:25:24 -06:00
Sergey Lipskiy
6725ad474a
Fix warnings of 64bit compiler.
2018-05-06 15:54:12 +07:00
Logan McNaughton
18e9a73eba
Cache SpecialFeatures check
2018-04-07 11:30:33 +07:00
Gillou68310
592c732ef3
Implement BOSS ZSort ucode (WDC, Stunt Racer)
2018-02-12 12:28:58 +01:00
Sergey Lipskiy
acc884ac0b
Apply Acclaim point lighting for vertices, which also shaded by standard lighting.
...
Fixed #1683 Turok 2: Seeds of Evil (and maybe other Iguana made games) - Object Dynamic Light Issue
2017-12-16 13:10:15 +07:00
Sergey Lipskiy
e068a9dd77
Revert "Change texture coordinates."
...
This reverts commit 89406223f5
.
Commit causes regression in motion blur effect in Zelda MM.
Reverted until further investigation.
2017-11-19 20:41:18 +07:00
Sergey Lipskiy
038c74af12
Correct gSPModifyVertex for case when widescreen hack enabled.
...
Widescreen hack breaks Disney's Tarzan amusingly #1501
(problem with 2D backgrounds in widescreen mode still exists and hardly can be fixed)
2017-11-17 13:45:50 +07:00
Sergey Lipskiy
29c9a778d9
Correct debug output
2017-11-16 18:52:32 +07:00
Sergey Lipskiy
5a037474a2
Code cleanup: fix compilation warnings.
2017-11-15 15:07:52 +07:00
Sergey Lipskiy
06b995c5f7
Code refactor: use _FIXED2FLOATCOLOR instead of _FIXED2FLOAT for color transformation from int to float.
2017-11-11 21:35:19 +07:00
Sergey Lipskiy
dcdf66dc0b
Fix hardware lighting. It was broken when lighting method was rewritten in 6af6e2c17f
...
Hardware lighting is incompatible with new lighting method.
Model matrix may be different for different vartices, but only latest state of inverted light vectors are loaded to shader.
Thus I reverted calculations of data for hardware lighting.
Minor code cleanup.
Fixed: Zelda OOT, bad lighting with HW per pixel lighting #1652
2017-11-11 21:35:08 +07:00
Sergey Lipskiy
dcf8784dca
Disable hardware lighting for ucodes with custom lighting methods.
...
Fixed #1542 Turok 2/Turok 3 Per Pixel Lighting Rainbow Weapons.
2017-10-31 17:42:48 +07:00
Logan McNaughton
168dccde2a
Allow Gauntlet Legends to boot in HLE
...
Code by LegendOfDragoon
2017-10-24 15:45:37 +07:00
Sergey Lipskiy
35cc66bad4
Code cleanup:
...
* make RSPInfo::busy and RSPInfo::halt boolean
* remove RSPInfo::close
* rename RSPInfo::bLLE to RSPInfo::LLE
2017-10-24 15:44:37 +07:00
gizmo98
7d22828193
gSPNEON.cpp: merge gSPLightVertex_NEON and gSPLightVertex4_NEON
2017-10-10 14:04:37 +07:00
gizmo98
39d4b223c8
arm neon: add gSPInverseTransformVector function
...
Fix declaration of gSPInverseTransformVector as well. Replace vtx[4]
with vec[3].
2017-10-10 14:04:36 +07:00
Sergey Lipskiy
c75985b9d8
Code refactor: rewrite HLE vertices loading.
...
Enable __VEC4_OPT for Windows release builds.
2017-10-06 17:03:11 +07:00
Sergey Lipskiy
d197db5b90
Rewrite Zelda MM Point Light
2017-10-06 17:03:11 +07:00
S2S
89406223f5
Change texture coordinates.
...
Subtracting 1 might not be accurate,
but it is done anyway in the rest of the code regarding sprites.
Just for the record, implementing correct texture coordinate handling
for sprites might need reverting this.
2017-10-04 16:15:46 +07:00
S2S
feb0e53034
Fix sprite sizes
...
Fixes https://github.com/gonetz/GLideN64/issues/936
2017-10-04 16:15:46 +07:00
Sergey Lipskiy
70c540b073
Rewrite fix for #1539 : keep in tile descriptor start address of frame buffer, not pointer on it.
...
Should be more safe.
2017-09-29 22:25:56 +07:00
Sergey Lipskiy
a2a96f3d92
Set CHANGED_LIGHT|CHANGED_LOOKAT bits when index in modelview stack changes.
...
Fixed #1417 [HLE] Lighting issue
2017-09-21 21:33:08 +07:00
Sergey Lipskiy
41aa06523e
Move ucodes source files to uCodes folder.
2017-09-21 21:33:08 +07:00
Sergey Lipskiy
47d718f287
Add F3DFLX2 ucode for F-Zero. Implement F3DFLX2 lighting method.
2017-09-21 21:33:08 +07:00
Sergey Lipskiy
8985e38bc0
Fix implementation of 0xD5 (Special_1) command for F3DEX2 ucode.
...
olivieryuyu found that 0xD5 command, when presents in ucode, updates combined matrix.
I could not remeber, which game uses implementation of F3DEX2_Special_1 with gSPDlistCount call.
Probably such game does not exists and this code was added by mistake. I removed it.
2017-09-13 18:01:15 +07:00