Commit Graph

125 Commits

Author SHA1 Message Date
Flyinghead 6ea61b9084 android: support 4KB and 16KB page sizes on 64-bit platforms 2025-07-06 22:16:06 +02:00
Isaac Marovitz 5a110fd666
Replace sprintf with snprintf (#1884)
Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
2025-03-25 18:47:07 +01:00
Flyinghead 6a15e7a3aa rend: LoD0 of VQ YUV textures is invalid. Use LoD1 instead.
Fixes background magenta textures in WSB2K2. Issue #1038
2025-02-02 17:11:22 +01:00
Flyinghead 5efdf58e85 custom texture: skip updating a texture if its hash hasn't changed
Some textures are frequently updated because of their location in vram,
close to a hotspot. This causes the custom texture to never be loaded.
This change will skip the unneeded texture update, allowing the custom
tex to replace it when available.
Issue #1812
2025-01-21 18:12:10 +01:00
Flyinghead e5b1d56a7c rend: split texture conversion routines into their own file 2024-12-14 19:07:18 +01:00
Flyinghead d789b57412 rend: get rid of globals for fog/palette updates & tex cache flush
Add state vars to Renderer
Use events to detect loading a state and terminating the game.
Don't present last rendered frame after game terminated.
2024-12-14 17:00:51 +01:00
Flyinghead a7f2008763 rend: support planar VQ textures
Fixes gens4all emu in teenage mutant ninja turtle collection.
Issue #868
2024-12-12 10:14:30 +01:00
Flyinghead af7353225b pvr: rgb888 needs to be correctly aligned when xclip.min != 0
Fixes glitchy combat opening animation in soul calibur (with full
framebuffer emulation). Use slower but correct method instead.
Issue #1591
2024-08-17 17:29:32 +02:00
Flyinghead 4cd6278104 rend: force palette update when setting dx order. extra depth for cvs
Force palette update when changing directx color order.
Add 10k extra depth scale to Capcom vs SNK 2000 Pro and cvs.zip to fix
winner character portraits not appearing during ending.
Issue #1546
2024-06-08 16:43:52 +02:00
Flyinghead de89d8cfed rend: fix Space Harrier arcade in Shenmue
Use the original tex dimensions and make sure they never change between
updates.
2024-03-12 14:56:13 +01:00
Flyinghead 4cd90d8ebb rend: yet another hash fix of vq textures
The calculated size for vq textures was half the correct value, which
affects the texture hash. Calculate the old hash and use it as fallback
for backward-compatibility.
Issue #1291
Make the texture data start address really point to max mipmap data, no
more codebook skipping.
2023-11-13 14:37:38 +01:00
Flyinghead 535fbe29f8 rend: fix hash of vq textures
Do correct hashing of VQ textures to avoid hash conflicts. Keep previous
hash for backward-compatibility.
Issue #1291
2023-11-11 18:57:16 +01:00
Flyinghead f4835a89d3 implement dithering in full FB mode
gl, vk, dx11, dx9: implement ordered dithering in GLSL/HLSL
refactor framebuffer and texture writes to vram
don't expand color data when reading planar textures
2023-09-10 16:25:19 +02:00
Flyinghead b6930a2a9e rend: force texture scanorder to 0 if vq and mipmap are set
Fixes crash and corrupted texture in Star Wars Demolition
Issue #1108
2023-06-13 14:55:47 +02:00
Flyinghead ae2bc8182f pvr: FB_W_CTRL.fb_alpha_threshold comparison is greater or equal
Fixes black tile under player feet in Izumo.
Force CopyToVRAM.
Issue #1040
2023-05-12 10:13:48 +02:00
Flyinghead afc1f5f4e1 Merge remote-tracking branch 'origin/master' into dev 2023-03-15 21:09:47 +01:00
Flyinghead e4332f6275 tex: ignore stride if 0. renderer: ignore invalid textures
Ignore StrideSel if 0 during texture update and use width instead.
Return false from BaseTextureCacheData::Update() if texture is invalid.
Make sure valid textures have non-null height and size.
gl,vk,dx9,dx11: ignore invalid textures

Fixes MINIDUMP-GP
2023-03-12 15:58:56 +01:00
Flyinghead 885a0508c0 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/hw/aica/sgc_if.cpp
#	core/hw/naomi/naomi.cpp
#	core/hw/sh4/dyna/driver.cpp
2023-02-28 20:02:23 +01:00
Flyinghead cf9ccea70b texcache: unprotect vram immediately even if actual Delete is delayed
Fixes MINIDUMP-A5, MINIDUMP-AF
2023-02-22 17:57:31 +01:00
scribam d8137a967c
C++17 (#926)
* cmake: use c++17

* Use std::size

* Use std::make_unique

* Use std::clamp

* Use structured binding

* Use [[fallthrough]]

* Use enable_if_t/is_enum_v/is_integral_v/is_same_v

* Use if constexpr

* Use try_emplace

* Use auto for iterators

* Use inline variables
2023-02-18 13:24:34 +01:00
Flyinghead 143073b61d rename _vmem to addrspace and move platform vmem stuff to virtmem ns
use namespaces
simplify names
no functional changes
2023-01-29 18:48:33 +01:00
scribam 80cf4406a7 cleanup include headers 2023-01-26 10:06:51 +01:00
Flyinghead f8372c51a7 Revert "wip headers"
This reverts commit e3e2c3a0d2.
2023-01-24 14:26:14 +01:00
scribam e3e2c3a0d2 wip headers 2023-01-23 18:29:04 +01:00
Flyinghead 1ab4eb00c0 tex cache: minor key mask fix. egl: no need for depth/stencil surface
Part of PalSelect was used as cache key for palette textures
PrintTexture fix
egl,wgl,xgl: No need for depth/stencil surface
gl: non-functional refactoring
2022-12-09 17:49:32 +01:00
Flyinghead 5722dc90f0 Full framebuffer emulation. Renderer interface changes
Helps for:
Densha de Go! 2, Issue #171
Vigilante 8, Issue #275
Xtreme Sports
Sonic Shuffle
The Ring of the Nibelungen
2022-10-23 16:32:42 +02:00
Flyinghead ad8b41adb0 boxart: extract 0GDTEX.PVR. Offline scraping
extract iso9660 file system utility out of reios
.pvr limited parser
2022-07-21 10:43:45 +02:00
Flyinghead 5eb302898f box art fetch and display
Issue #22
2022-06-15 21:22:12 +02:00
flyinghead afd07c25ba pvr: store tex address in render context. texture cache refactoring
Store FT_W_SOF1 and FT_W_CTRL in render context since they can be
modified before render end. New tentative fix for vf4 water reflection
flashing black during netplay.
Refactor texture cache to use constructors. RTT code moved from
renderers.
Partial revert of ddcd3861d3
2022-06-11 13:24:22 +02:00
Flyinghead ddcd3861d3 ggpo: don't protect rtt texture vram if ggpo is enabled
tentative fix for flashing water reflection texture in vf4 during
netplay
2022-05-31 17:42:42 +02:00
scribam 12929c4571 openmp: use _OPENMP preprocessor, search openmp pkg unconditionally if enabled 2022-05-17 16:36:57 +02:00
Flyinghead bf61f5cfe8 Merge remote-tracking branch 'origin/master' into dev 2022-04-04 12:11:10 +02:00
Flyinghead 1e01dbb151 wrong line padding value when copying RTT to vram due to previous commit 2022-03-26 20:51:07 +01:00
Flyinghead be270259ee crash with RTT and copy to VRAM if width > linestride
RTT texture width must not exceed FB_W_LINESTRIDE
fixes Flag to flag crash
2022-03-25 15:41:16 +01:00
Flyinghead e1038ea632 naomi2: fix regressions. 2-volume and bump mapping support WIP
optimize open gl uniforms
2022-01-26 22:15:10 +01:00
flyinghead 99195c3f4c dx11: set clip planes on X and Y. rend: Force palette update at init
dx11: Set clip planes at X -1/1 and Y -1/1 to avoid rasterizer errors.
Fixes Daytona Mermaid lake depth issues
dx11: fix texture wrap around at UV 1 with nearest filtering
dx9: inside clipping
all renderers: force full palette update at init
2021-12-01 14:54:03 +01:00
flyinghead f91847dad0 DX11 renderer WIP 2021-11-26 18:08:41 +01:00
Flyinghead 0d2e6f5e98 remove safe mode/div matching option
mismatched delete/free() in TexCache.cpp
2021-09-29 11:57:51 +02:00
Flyinghead 69d0801121 net rollback with ggpo 2021-09-02 17:51:23 +02:00
Flyinghead 7f49accc22 Merge remote-tracking branch 'origin/master' into fh/directx 2021-06-07 20:53:31 +02:00
scribam d6545b253b Misc cleanup 2021-06-06 11:15:06 +02:00
flyinghead 7ed68952ba Merge remote-tracking branch 'origin/master' into fh/directx
# Conflicts:
#	core/deps/patches/SDL.patch
#	core/hw/maple/maple_devs.cpp
#	core/rend/gl4/gles.cpp
#	core/rend/gles/gles.cpp
#	core/rend/gui.cpp
#	core/rend/gui.h
#	shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj
2021-05-26 22:38:48 +02:00
Flyinghead 373dffc65a wince: ditch vmem32. use address LUT in dynarec. finer grained flush 2021-05-17 11:59:34 +02:00
flyinghead 6316479930 get rid of unneeded pixel unpacker and use better name 2021-04-29 18:38:58 +02:00
flyinghead 5359e9a09d allow gpu-handled palette textures to be replaced by custom version
Issue #219
Fix incorrect texture size calculation for VQ textures.
Reorder BaseTextureCacheData fields to have hottest on top
2021-04-17 18:40:58 +02:00
flyinghead c889bfa6d4 dx9: copy to vram. clipping. fix depth/stencil size. better reset
Coordinate device reset with dxcontext. Keep compiled shaders.
Don't use automatic depth/stencil on backbuffer. Manually handle it.
Implement scissoring/clipping
multipass translucent depth
Render-to-texture copy to vram
2021-04-15 15:17:32 +02:00
flyinghead b549c56b23 build fix. default Delay Frame Swapping to true 2021-04-13 11:20:11 +02:00
flyinghead f107d380b9 WIP directx9 renderer 2021-04-12 22:49:04 +02:00
Flyinghead 24d172bd51 gl: use async PBO to copy texture back to vram 2021-04-08 10:33:14 +02:00
Flyinghead dc0c5baece move vram to pvr 2021-03-28 20:08:02 +02:00