Commit graph

43 commits

Author SHA1 Message Date
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
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
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
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
c562b76641 *Clean build from StrmnNrmns repo 2019-02-27 17:04:51 +11:00
Wally
8bc2012f0e Fix 64 bit support from StrmnNrmns Bazel branch 2019-02-04 13:52:39 +11:00
salvy
36a13d5616 [!} Many clean ups to accurate TMEM 2013-06-12 22:13:00 -07:00
Paul Holden
49a06ed319 [~] Make header guards consistently use FULL_PATH_TO_FILE_H_, with script 2013-06-04 22:02:30 +01:00
salvy
bfda2d99b0 [!] Fixed sky in glover and tearing in flying dragon (Note: Sky needs work, while is displayed correctly now, in unscaled mode goes offscreen)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1601 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-04-22 07:49:14 +00:00
salvy
581072f5e2 [!] Fixed MSVC warnings
[!] Optimization for Sprite2D, only update the counter individually when next command doesn't match
[!] Fixed and optimized guNormalize_Rugrats (Still can't find any game that uses this errg)

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1599 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-04-18 22:05:31 +00:00
strmnnrmn
bc97515b5a [!] Fix DLParser_Sprite2DDraw
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1366 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-23 00:13:30 +00:00
salvy
1a8aa9b8e1 [!] Fixed bad assumption for sprite2D in Glover
[!] Accurate TMEM can be used on the PSP (Just define DAEDALUS_ACCURATE_TMEM)
[!] Use StrmnNrmn's PrepareTexRectUVs for PSP(No need for hacks and I don't think is too expensive at the end)
[~] Fixed a SP DMA bug in W32 (I still think we should use the PSP method, since it works fine)
[~] Set rounding mode in W32/OSX (NOP for PSP)
[+] Handle more regs in MTC0
[~] Some clean ups


git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1358 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-22 06:55:04 +00:00
strmnnrmn
65928a7b4f [~] Fix Draw2DTextureBlit on OSX. It's only needed on PSP and Draw2DTexture works fine for OSX. So move the logic for calling (w>=512) to RendererPSP::Draw2DTexture, and remove Draw2DTextureBlit from the BaseRenderer abstract interface.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1346 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:42:08 +00:00
strmnnrmn
b7486694f9 [~] Pass S2DEX/Sprite2D texture loads through the renderer so that it can keep track of what's loaded
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1344 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:51 +00:00
strmnnrmn
231b248979 [~] CTextureCache::GetOrCreateTexture can return a CNativeTexture now.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1314 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:17 +00:00
strmnnrmn
f0c89b1874 [~] Make CachedTexture::UpdateIfNecessary private. Always do this when returning from CTextureCache::GetOrCreateTexture (the mFrameLastUsed check in IsFresh ensure that this does nothing if called many times in a frame)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1311 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:37:50 +00:00
salvy
942fda9c4a [!] Use a temp mat when multiplying matrices..We could overflow since we were using the next stack slot for storage which mMatStackSize aware, also gcc gives better asm using a local variable :)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1299 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-15 02:29:18 +00:00
salvy
42f2ab8f17 [!] Optimized sprite2D, it assumes base is always followed by flip and draw, and executes as many sprite2d ucodes as possible
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1298 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-15 02:03:57 +00:00
strmnnrmn
2b4774c449 [~] Fix a warning in Ucode_Sprite2D.h - Sprite2DInfo might not be initialised if the dlist is crazy.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1291 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-12 20:54:41 +00:00
strmnnrmn
c82743aedb [~] Rename CTextureCache::GetTexture to GetOrCreateTexture (more greppable). PAss a TextureInfo reference instead of a pointer
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1261 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-12 20:51:11 +00:00
strmnnrmn
058c7de6b5 [~] Rename CTexture to CachedTexture
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1249 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-10 19:01:41 +00:00
salvy
56be0ba2cc [!] Some clean ups and commenting
[~] Removed offscreen check, only conker needs the format check

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1180 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-06 03:18:18 +00:00
strmnnrmn
1e9e443f79 [*] Get rid of the PSPRenderer singleton, and implement as a simple gRenderer pointer. This gets rid of the PSPRenderer typename everywhere, which will make the next step easier (adding an OSXRenderer, and making that and PSPRenderer derive from BaseRenderer. Also in this commit, fixed a bunch of mixed tabs/spaces and formatting.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1107 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-02 15:46:18 +00:00
salvy
9bcda57231 [!] Use triangle strip for Draw2DTexture (Since we need to flip some sprites)
[+] Implement sprite flip for Sprite2D (fixes SSV's sprites in main screen)
[!] Fixed sprites and text being scrambled in Wipeout (Text is being rendered as "A", texture update bug?)

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1033 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-02-19 21:11:39 +00:00
strmnnrmn
ae45a98925 [~] G_TT_RGBA16 etc were redefined from the values in ultra_gbi.h, which is confusing. Just define our own enum which defines these in the range 0..3
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1004 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-02-17 19:44:14 +00:00
strmnnrmn
0e698c385d Fix all the remaining mixed newlines
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@852 42e9bfbe-799a-4a2d-bad1-236e862a387a
2012-12-08 14:21:04 +00:00
strmnnrmn
767e4efd9c Fix line endings
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@822 42e9bfbe-799a-4a2d-bad1-236e862a387a
2012-11-28 22:11:57 +00:00
salvy
eaa0f2b641 [!] Opps reverted previous commit
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@810 42e9bfbe-799a-4a2d-bad1-236e862a387a
2012-11-14 20:42:24 +00:00
salvy
ce36d63b82 [!] Use TI hash to check if the texture is the same (we'll reuse it in the cache too)
Note: T1 hack is broken!! FIX ME

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@809 42e9bfbe-799a-4a2d-bad1-236e862a387a
2012-11-14 20:29:08 +00:00
salvy
3e7389df90 [!] Simplified when setting TlutAddress
[!] Moved out gVertexStride outside the Tris loop 
[!] Call directly TlutAddress (saves function call)
[!] Bring back recolour white texture (Is needed by Krby's clouds)
[~] Code clean ups etc

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@803 42e9bfbe-799a-4a2d-bad1-236e862a387a
2012-11-07 19:37:58 +00:00
Corn
7429e4701a [!] New TMEM implementation (that fixes palettes in a few games) now works without the need to copy TLUTs to TMEM.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@783 42e9bfbe-799a-4a2d-bad1-236e862a387a
2012-10-18 10:57:07 +00:00
salvy
12060459d0 [!] Forgot this
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@779 42e9bfbe-799a-4a2d-bad1-236e862a387a
2012-10-11 07:17:54 +00:00
salvy
9932094a4b [!} Some cleanups in S2DEX and Sprite2D
[!} Made palette loading in S2DEX compatible with recent changes (when using DAEDALUS_TMEM)

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@778 42e9bfbe-799a-4a2d-bad1-236e862a387a
2012-10-11 07:07:29 +00:00
salvy
8f958d844b [!] Rewrote "full tmem" implementation (based from Rice plugin, doesn't need TLUT hack, can't return NULL, and can be modified by Sprite2D and S2DEX)
[!] Implemented correctly tlut state in Sprite2D (fixes Wipeout and other games, only when full TMEM is defined)

Note: These changes are NOP unless DAEDALUS_TMEM is defined, which is disabled since is slower and uses more memory than our fast implementation *Hopes Corn can port these improvements to it :)

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@777 42e9bfbe-799a-4a2d-bad1-236e862a387a
2012-10-09 01:35:33 +00:00
Salvy
a6d40016ca [!] Fixed scaling bug in Sprite2D
[!] Small optimization in RDPHalf1_GoldenEye

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@501 42e9bfbe-799a-4a2d-bad1-236e862a387a
2011-11-27 01:36:41 +00:00
Corn
03602ad577 [!] DKR only needs 80 verts array after all (no need for 128)
[!] Updated CPU TnL

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@484 42e9bfbe-799a-4a2d-bad1-236e862a387a
2011-11-11 19:46:31 +00:00
Salvy
e03350e430 [!] Initial work to get S2DEX_Bg1cyc working for Yoshi [WIP] (Note : the BG still stretches mostly in the edges of the screen)
[!} Removed unused entries in MoveMemViewport

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@444 42e9bfbe-799a-4a2d-bad1-236e862a387a
2011-10-14 23:35:27 +00:00
Salvy
32acd8a57b [!] Sorted all ucodes and moved them to headers to make development easier and make sure cod placement is optimal (Note : More clean ups and sorting are needed)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@407 42e9bfbe-799a-4a2d-bad1-236e862a387a
2011-09-22 15:47:29 +00:00
Renamed from Source/HLEGraphics/gsp/gspSprite2D.cpp (Browse further)