Commit graph

262 commits

Author SHA1 Message Date
Wally4000
a69ee0a3f3 More std::array magic 2022-05-03 12:50:08 +10:00
Wally4000
3fec82b04d Remove stdafx.h for consistency 2022-03-22 18:06:17 +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
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
37db2e4337 Removed -1 from uViHeight/uViWidth
*This was actually breaking the fix for New Tetris.. Originally we were doing -1 for the clear screen check in Fillrect, this been updated too. The check in SetScissor did not need to be updated as it was already clamping when the if the N64 resolution was equal or greater..
*Always clear z buffer first in fillrect
2020-07-18 13:15:58 -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
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
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
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
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
=
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
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
=
1c342d8c8f Revert all initialiser list variables. 2020-05-04 12:24:21 +10:00
joey
9056cce916 Fixed narrowing errors on Clang / OSX build 2020-04-15 19:53:32 -04: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
z2442
275aacd212 more nullptr updates 2019-05-03 21:09:20 -04: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
z2442
d90bac8ef5 clean up narrowing errors 2019-03-23 20:24:40 -04:00
Wally
5dee7fe2cb Converted remaining HLEGraphics to C11 standard 2019-03-22 16:39:50 +09:00
Ben Slater
c562b76641 *Clean build from StrmnNrmns repo 2019-02-27 17:04:51 +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
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
d8c43fa5f0 [!] Cleaned up MatrixFromN64FixedPoint
[!] Fixed Super Bowling's left screen
2013-09-09 21:58:44 -07: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
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
CornN64
a0ff7c8160 [!] Further optimized lighting calculations and branches in conker TnL.
[!] LightVerts() now returns only R,G & B (V3 and no A)
[!] Lights color and direction now uses V3
[!] Fixed RDP_MoveMemLight() to proper light direction.
2013-08-01 18:39:16 +02:00
salvy
1752532c22 [!] Optimized RDP_MoveMemViewport 2013-07-31 22:33:54 -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
Paul Holden
57bb16c9ee [!] Work around for dlist dump not working anymore on the PSP 2013-07-12 21:56:34 +01:00
Paul Holden
a14f741b7a [+] Hack for Banjo Tooie shadow 2013-07-12 21:46:29 +01:00
Paul Holden
471de5190d Change the MomveMemLight code to use u8 for r/g/b and not u32 - the psp compiler generates much better code like this. 2013-07-09 23:45:44 +01:00
Paul Holden
4a5d732533 x/y/z/r/g/b are printed with %d, but are floats. Makes more sense to extract them as ints, and convert to float when the Setxxx function is called. 2013-07-09 20:55:14 +01:00
salvy
8482a296f7 [~] Fixed black box that appeared in SSB when flying away from the screen 2013-06-26 21:51:41 +01:00
salvy
20ca36cb1a [!] Fixed light in Majora's Mask 2013-06-13 00:41:30 -07:00
Paul Holden
067a594a9f [~] Move ConfigOptions.{h,cpp} to Config/ and tidy header include order. 2013-06-04 22:02:31 +01:00
salvy
9c22fc361b [~] Opps typo
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1715 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-05-23 05:46:10 +00:00
salvy
99988d4f9d [+] Added advanced option to enable "Clear Depth FrameBuffer", needed for DK64 and Zelda's special effects (This can slow down games, make sure to only enable it if needed)(This enabled by default for PC)
[!] Optimized Clear Depth FrameBuffer (Corn)


git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1714 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-05-23 05:44:40 +00:00
salvy
9fd514382b [~} Removed some code that wasn't meant to be committed
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1713 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-05-22 17:42:33 +00:00
salvy
f652ae99b4 [+] Added clear framebuffer (fixes jumpy camera in DK64, and sun and flames flare in zelda) Note: Is very expensive, so is only enabled for DK64. Might only enable it for PC eventually.
[!] Use integers as much as possible for fillrect

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1712 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-05-22 17:40:25 +00:00
salvy
af19d1a3b3 [+] WIP: Implemented CPU framebuffer, used by demos, Donald Duck, Rayman 2 The Great Escape, and probably other games (currently W32/OSX only)
[-] Reverted small constant opt from previous commit, is not worth breaking when EPak isn't used

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1675 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-05-14 20:11:42 +00:00
salvy
7277157047 [!} Constant optimizations for CFragment::Execute (this is a very hot function!, saves 4 ops)
[~] Keep bitfields for texrect, since compiler generates much better asm when it converts int to float (~30 ops)
[!] Clean ups to gu oshle patches, also optimize when reading from stack since is always physical memory

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1674 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-05-11 06:37:21 +00:00
Corn
ff6d1fb666 [!] Simplified scissor test in TexRect
[!] Fixed some formating in Dlist debug

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1673 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-05-10 12:44:40 +00:00
strmnnrmn
9821e04675 [~] Update DAEDALUS_ASSERT and other macros that are compiled out of release builds so that they 'consume' their arguments without generating any code. This removed the need for use() in a lot of places.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1655 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-04-27 16:37:17 +00:00
Corn
c329fbd011 [!] reverted some unneeded conversions/bloat
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1600 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-04-19 20:25:01 +00:00