Commit graph

2692 commits

Author SHA1 Message Date
Carlos R
7a7706eb72 Merge remote-tracking branch 'origin/master' 2020-07-16 20:15:14 -07:00
Carlos R
757505fb43 Optimization for accurate TMEM
Optimized ConvertIA16, this an old change I had that I forgot to commit :/
2020-07-16 20:14:13 -07:00
Wally4000
d782bc73e3 Readded shadows :) 2020-07-16 21:04:04 +10:00
Wally4000
24bb0cbe23 Update Intrafont with latest sources from https://gitlab.com/HaydenKow/libintrafont
This fixes the horrible menu issue we've been having
2020-07-16 12:34:27 +10:00
Carlos R
e9e0999540 Fixed crash in Pokemon Puzzle League, Fifa 98 and other games
This is a workaround to prevent crashing the emulator when trying to load excessive large textures
2020-07-14 21:59:41 -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
3de6b8210e Fixes and improvements for hle cache and mempack support
*Fixed mempack support when savetype is not unknown, for simplicity we always assume the presence of the mempack. Ill add proper support to disable it later
*Removed force flag for Save_Flush, this was a legacy flag mainly used to manually allow users to force saving
*Moved hle cache directory inside the SaveGames folder and removed all the duplicate code added when it was moved to its own directory
*Fixed accurate TMEM for the PSP (still disabled on the PSP)
2020-07-12 14:10:40 -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
b37c629d8a *Defined DAEDALUS_SILENT for release builds to
*Fixed batch test for Linux and tidy when setting path for executable
*Fixed rom.db for linux
2020-07-11 15:10:55 -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
9801199bf6 Clean ups from last commit
*Removed CLIP_TEST_FLAGS usage, I tested several games and I did not find any issue when all the clipping flags were set
*Refactored set ClipFlags to avoid duplicate code and make it easier to debug
2020-07-04 02:29:23 -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
Carlos R
d1ce452382 Improvements to BaseRenderer
*Avoid division by zero in the viewport code and properly handle PAL scaling // taken from bazel and Vita port
*Restored bound checks for AddTri , TestVerts and  ModifyVertexInfo
*Refactored CPU and VFPU vtx pipelines to make it easier to maintain
*Combined UpdateWorldProject and PokeWorldProject
*Added proper null check to LoadTextureDirectly
2020-06-27 12:08:58 -07:00
Carlos R
5a403c9f24 Refactored rom write support and clean ups for ROMBuffer.cpp 2020-06-12 17:17:58 -07:00
Carlos R
78734ef838 Misc changes to the memcpy swizzle and added a missing blender (GL) 2020-06-11 08:49:25 -07:00
Carlos R
e213b81291 Fixes for DMA SP and memcpy swizzle
[*] Fixed memcpy usage for aligned path for the memcpy swizzle and also enabled it for Linux/OSX
[*] Refactored unaligned path for memcpy swizzle and also fixed memcpy_test
[*] Set correctly sp mem region for DMA_SP
2020-06-10 09:25:14 -07:00
Carlos R
703b2663d4 Fixes for flash ram and rom read
[*] Removed redundant check for flashram read/write, actually this was incorrect for flashram read..
[*] Added return for failed DMA flashram transfers
[*] Set correct save type for Derby Stallion
[*] Set flashram type correctly, fixes saving for Derby Stallion
[*] Added check to prevent reading rom from out of range
2020-06-09 22:36:05 -07:00
Carlos R
f19e4262e5 DMA fixes
* Added check for odd PI DMA length, fixes Doraemon 3
* Fixed incorrect mask for spmem_address, thanks Rinnegatamante for pointing out this
* Moved rdram overflow check outside the count loop
* Added FAST_DMA_SP define and enforce 8 byte alignment for correctness. This is still only enabled for the PSP but should be safe to enable for other platforms where speed its important
* Small clean ups
2020-06-09 21:31:11 -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
=
aa569512bb Small cleanup 2020-05-27 19:23:45 +10:00
=
1511baa25e Fix up paths in headers 2020-05-27 19:20:52 +10:00
Carlos R
0a1581d4e5 Fixes for MemoryUpdateSPStatus
*Make code more readable
*Fix bug where we weren't clearing the SP_STATUS_BROKE bit and ensure the RSP tasks are executed when clearing this bit
2020-05-26 22:02:37 -07:00
Carlos R
1ea107e15a Misc changes
*Added FB task from the Vita port. verified working on PPL
*Disabled OSHLE for linux/osx, we don't have a dynarec, no point to have it enabled
2020-05-26 20:32:50 -07:00
Wally4000
744fea9b71 Ensure we close the file on each instance we destroy a png object. 2020-05-24 21:53:12 +10:00
wally4000
46c23041ce
Merge pull request #19 from salvy/master
Accuracy fixes
2020-05-20 16:56:10 +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
Carlos R
7937cc748c * Implement missing dom1/addr1/3
Fixes bug in Paper Mario where a save slot will get duplicated also fixes a bug in Majora's Mask where link did not have a shield and sword during the first movie
2020-05-16 15:02:35 -07:00
g
66b84def41 Revert "some fog changes better but not perfect."
This reverts commit 5a8720ecfb.
2020-05-16 21:19:22 +10:00
joey
afea726b77 Revert "Update Async audio code"
This reverts commit df857580a6.
2020-05-16 21:18:12 +10:00
salvy
4508825624 Merge branch 'master' of https://github.com/DaedalusX64/daedalus 2020-05-13 19:39:49 -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
Wally4000
9852a7eb7b Accurate TMEM required for Posix build. 2020-05-13 11:47:44 +10:00
Wally4000
8043afce6e Add Cache / Save Game path support to Posix build.
Correct long filename in roms.ini
2020-05-12 22:56:52 +10:00
salvy
937534e81d Typo 2020-05-12 03:00:01 -07:00
salvy
6f97bf4a6e Microcode fixes
*Fixed possible overflow of ucode entries, also spread entries to avoid always overriding the last entry
*Fixed out of bounds assert for microcode data
*Properly check both microcode data and code base for ucode cache
*Removed gLastUcodeBase,  potentially caused ucodes not to be loaded correctly.  This was legacy code before we had the ucode cache
*Fixed 32bit pointer assumption on DLParser_SetCustom
2020-05-12 02:36:25 -07:00
salvy
1f7396aff8 Merge branch 'master' of https://github.com/DaedalusX64/daedalus 2020-05-12 00:46:07 -07:00
salvy
290a13e22f Update main.cpp
Fixed PSP slim detection
2020-05-12 00:43:33 -07:00
=
de27d59ecf Fix Dev options to debug output 2020-05-12 17:36:02 +10:00
=
de0e24096c Revert "Backport of Frangarcj's view port change."
This reverts commit 382f3c111d.
2020-05-12 17:30:52 +10:00
joey Radcliffe
9b9a88604c Compiles on OSX now :) 2020-05-11 19:31:30 -04:00