Commit graph

224 commits

Author SHA1 Message Date
Wally4000
3fec82b04d Remove stdafx.h for consistency 2022-03-22 18:06:17 +11:00
Wally4000
eadc1b3758 move from typedef to modern using declaration 2021-10-18 18:58:14 +11:00
Wally4000
b1e6ac01da Adding in some std:: functions to replace some templates 2021-10-16 22:54:18 +11:00
Wally4000
15e3e2a1d0 Update to the Bazel Directory Structure.. 2020-08-22 18:42:41 +10:00
Carlos R
f9a986a6cc S2DEX fixes
*Corrected inclusive typos for partial and no rotation modes (fixes gaps in V-Rally and Worms sprites)
*Implemented flipX/Y for full rotation (Worms uses this when the character fall down)
*Defined flags for flipX/Y
2020-08-10 22:04:58 -07:00
Carlos R
47652f082e Refactored S2DEX_BgCopy/Bg1cyc
These use the same struct and SpriteLoad function
Added list of games that use S2DEX, useful for testing
2020-08-09 17:02:48 -07:00
Carlos R
ff9f4811a2 Fixed typo in Sprite2D 2020-08-09 17:00:48 -07:00
Carlos R
59a8d35114 Ensure we point to the correct instruction for Sprite2D 2020-08-05 08:54:39 -07:00
Carlos R
264ded00a8 Refactored S2DEX, FB and Sprite2D 2020-08-02 15:46:55 -07:00
Carlos R
01a3356327 More improvements for Sprite2D
*Fixed typo in the bound check from last commit
*Added hack for WCW Nitro, fixes sprite issues, this game should be playable now
*Refactored Sprite2D for consistency (same structure as S2DEX)
2020-08-01 14:29:49 -07:00
Carlos R
29f3709776 Accuracy and optimizations for Sprite2D ucode
*When executing sprite2d instructions, fetch the next instructions at once and bail out sooner when there's an invalid instruction
*Avoid using Swap function for FlipX/Y, is faster to manually swap
*Properly set left, top, right and bottom coordinates
*Properly set texture width, we were wrongly using ImageW, also renamed fields that were named incorrectly in Sprite2Struct
*Added bound checks
2020-08-01 13:57:26 -07:00
Carlos R
bfffb7be1c Removed duplicate from convertimage/tile
*Moved all the conversion routines to ConvertFormats.h
*Fixed a lot of wrong bitshift operations (Rinnegatamante)
2020-07-26 11:18:46 -07:00
Carlos R
e0070b6861 Fix for blast corps and more bound checks
*Properly trigger DP interrupt, some games are very sensitive when we ignore it. Blast Corps no longer hangs after the Rare logo. Also ensure to trigger the interrupt when frameskip its enabled to avoid stalls
*Added bound checks for DLinMem and DLCount
*Disabled invalid address bound checks for the PSP. With the recent changes, now its safer to disable it
2020-07-12 15:10:16 -07:00
Carlos R
b39e6d119e *Do not set the texture tile and scale when texture its disabled, also handle properly when the texture scale its 0, DKR does this
*Convert segment address to a physical address (fixes an ancient bug discovered by recent changes to RDPSegAddr (fixes a crash in DKR)
2020-07-11 15:29:31 -07:00
Carlos R
3c1a74d1b7 *Properly mask down RDPSegAddr, also removed now redundant masks
*Added more bound checks
*Removed compiler workaround in MatrixFromN64FixedPoint and GBI1_DL, I checked and latest PSP toolchain optimizes this correctly now
2020-07-10 15:16:07 -07:00
Carlos R
da6b5132b3 *Proper implementation for Branchz and added Zelda implementation, thanks Rinnegatamante
*Optimization in CPU_CheckStuffToDo
2020-07-10 13:30:21 -07:00
Carlos R
de782b19ae Implemented Trix for GE and PD 2020-07-05 15:18:45 -07:00
Carlos R
3d1184f990 *Removed vertex stride from the ucode cache, now vertex stride its applied at compile time for all microcodes
*Removed GBI0_Tri4 (F3D microcode doesn't support it)
*Moved GBI0_Tri4 implementation to Ucode_GE.h since this is actually part of the custom microcode used by GE and PD.
2020-07-04 17:37:52 -07:00
Carlos R
ad31af0d97 Optimized CullDl
*Fixed culling for Aydin Chronicles (first and last param its reversed)
*Avoid doing a bound check twice for testverts, the display list would get culled regardless
*Return early when Dlist its visible

PS: CLIP_TEST_FLAGS its meaningless right now since all clipping flags are checked, we can remove it after testing further if that's ok or if we need to relax the clipping flags for No Near Plane microcodes
2020-07-03 19:46:49 -07:00
Carlos R
6733dbc19d F3D improvements
*Implemented CullDL for F3D microcode, small speed up for games that use this, ex Wave Race 64
*Fixed max light constant for F3D/EX/2
*Continue WIP to optimize the vertex indices at compile time  (F3D its done now)
2020-07-02 22:37:56 -07:00
Carlos R
f70c0180b5 Prep work to add more custom ucode implementations
*Refactored RDP_MoveMemLight to prevent duplicate code and simplified it for adding custom lighting impls. Also added bound checks for invalid light index and addresses
*Added hash for Rogue Squadron (this a custom GBI1 ucode), currently unimplemented 
*Do not hardcode GBI commands when patching custom ucode tables
*Fixed DKR's index mtx address, thanks Rinnegatamante for pointing out this error
2020-07-02 09:15:45 -07:00
Carlos R
4e48f03020 Fix some uninitialised states in the renderer which was breaking lightning in debug builds. Thanks StrmnNrmn! 2020-07-01 22:44:17 -07:00
Carlos R
ef3752e3d2 Implement F3DBETA ucode (this an early version of Fast3D)
*Remove SOTE ucode implementation, this was wrong. Now both SOTE and WRUS will use the Beta ucode
*Fix typo from previous commit that caused that changed ucode hash.
*Added WIP to set the vertex stride at compile time to allow the compiler to do further optimizations when the stride its a power of two. Currently its only done for the new F3DBETA ucode as a test.
2020-06-28 23:13:42 -07:00
Carlos R
9bec25e3ca More improvements to the gfx ucode detection
* Auto defect and cache ucode functions and vertex stride
* Speed up custom ucode detection, avoid string detection and return as soon as there's a match
* Do not attempt to auto defect ucodes that lack a version string
*Alot of code clean up, now custom ucodes should be easier to add (everything related its now in Microcode.cpp)
*Bound checking for InitMicrocode and make sure to set a default ucode version if there's a failure
*Hardcode code_size to avoid issues when hashing ucodes when games set an invalid size, ex Conker
*Simpler way to clear the ucode cache
*Always include gNormalInstructionName even on release builds, the memory we saved wasn't worth the hassle to keep it out of release builds..
2020-06-28 19:28:21 -07:00
Carlos R
ee22e26003 More bound checks
*Implemented IsVertexInfoValid to add proper bound checking our vertextinfo
*Implemented IsAddressValid to add proper bound checking when referencing an N64 ram address, currently its only used for DMA_Tri_DKR
*Fixed bug bugged addresses in DKR ucode
*Removed now redundant bound checks, some of these were either wrong pr inconsistent
2020-06-27 13:53:06 -07:00
=
f26134fa42 Finalise appropriate ptr changes 2020-05-28 09:47:31 +10:00
=
3707c880c2 Revert move to HWFog, we'll re-add this at a later date. 2020-05-28 09:38:37 +10:00
=
1511baa25e Fix up paths in headers 2020-05-27 19:20:52 +10:00
Carlos R
934ea22c7f Fix crashes in Paper Mario and Yoshi
*Correct bad pointer casting for optimized copy in Yoshi_Memrect and fixed non optimized copy
*Store n64 ram offset rather than the system memory for Fast TMEM (thanks strmnnrmn!). Fixes random crashes when using the non accurate path for TMEM emulation
*Make sure to reset tmem block for fast TMEM even when accurate TMEM its used since we fall back to the non accurate path when games set line to 0
*Ignore load tile for accurate TMEM when line its 0, this was causing a crash in Paper Mario which sets line = 0
2020-05-16 16:09:17 -07:00
salvy
831be5b995 Debug build fixes
*Fixed debug build when DAEDALUS_DEBUG_DISPLAYLIST its defined, also I enabled it for debug builds
*Fixed ptr->u32 cast in DLParser_DumpVtxInfoDKR, it was causing a compilation error for me)
*Removed unsused zlib from third_party, also added webby
2020-05-13 19:39:20 -07:00
Rinnegatamante
839825dce3 Move to hw fog usage. 2020-04-27 15:11:35 +02:00
Wally
2d7157e5a9 Got SDL2 build compiling again.. Not sure if it works yet, crashes KDE on my VM 2019-05-27 13:00:23 +10:00
Ben Slater
6a725bf99e Removed a bunch of asserts / debug options from release build, stabs a bunch of compiler warnings 2019-05-03 17:43:44 +10:00
Wally
30eca8117b yShuffle some files around
Added -lc to build script to use fast memcpy

A#
2019-03-18 15:45:59 +09:00
Ben Slater
c562b76641 *Clean build from StrmnNrmns repo 2019-02-27 17:04:51 +11:00
Ben Slater
9bd9b31776 Fixed Linux debug build and build_daedalus script 2019-02-23 22:18:43 +11:00
Wally
8bc2012f0e Fix 64 bit support from StrmnNrmns Bazel branch 2019-02-04 13:52:39 +11:00
Wally
e17fdddadf [~] Fix Conker Regression
[+] Remove a hell of a lot more missed asserts.
2019-01-23 17:05:36 +11:00
mrbenslater
2e6cf17baa Move more debug stuff out of Release 2019-01-21 19:58:47 +11:00
salvy
351e16a38c [!] Fixed PC build
[!] No longer needed to clear tnl flags
[~] Removed unused variable
2013-09-25 12:31:58 -07:00
CornN64
bfd94b655c [!] Some WIP for vertex fog on PSP (functions on many games that uses the standard TnL. It uses a second pass to blend in the fog)
[-] Reverted some changes from previous commit since it broke texturing in some games and CBFD lights.
2013-09-21 18:31:48 +02:00
salvy
caebcfd07a [!] Proper implementation of Clear_N64DepthBuffer (Fixes crash in SSB)
[~] Some clean ups
2013-09-06 00:05:04 -07:00
salvy
9e88e012b5 [!] Always set SkipIfZero when LigtCol is set
[!] Refactored MV_LIGHT
[!] Removed invalid light direction check (This was for the PSP, I don't think is required)
2013-08-19 08:18:22 +01:00
salvy
7320eaef08 [!] Make sure to clear TnL flags, also rename it from TnLPSP to TnLMode 2013-08-19 08:18:22 +01:00
CornN64
11703ec45a [!] Optimized GBI2/MM point light calculations and light struct for CBFD and MM 2013-08-19 08:18:22 +01:00
salvy
189493fb59 [!] Moved Conker's coord mod to tnl struct
[!] Changed abit how Vtx Conker len and n are calculated
[~] Some minor clean ups
2013-08-19 08:18:22 +01:00
salvy
be0f32311c [!] Implemented proper lightning for Majora's Mask
[!] Improved N64Light struct, it can now handle GBI2 (thnx corn for helping!)
[!] Fixed compiled error in SetNewVertexInfoPD, and some clean ups
2013-08-19 08:18:12 +01:00
salvy
d3624540ea [!] Typo that was causing many glitches in Conker 2013-07-31 14:15:13 -07:00
salvy
d10ff1ca11 [+] Implemented lightning for Conker rendering (PC/OSX only for now) (Corn & Salvy)
[!] PSP VFPU ASM compatible with new light struct as well possible to interface with Conker's new TnL.  (Corn)
[!] Slight tidy in audio Alist processing loop. (Corn)
2013-07-31 13:56:36 -07:00
salvy
eb88b1a115 [!} Fixed backgrounds in Ogre Battle (This is based from Glide64 implementation)
[!] Fixed S2DEX2 jump table
2013-07-02 01:41:29 -07:00