Commit Graph

90422 Commits

Author SHA1 Message Date
wutno 065c74a00f nv2a: Don't manually set NV_PFB_CFG0 reg 2023-03-06 14:02:41 -07:00
Dustin Holden d8fa50e524 smc: Implement read/write of SMC error code storage 2023-02-14 17:10:40 -07:00
Matt Borgerson d0d3e7b4fa xemu-win64-toolchain/sdl2.mk: Specify PKG_FILE 2023-01-23 10:37:06 -07:00
Matt Borgerson c08183c54d xemu-win64-toolchain: Add libslirp v4.7.0 2023-01-23 10:37:06 -07:00
Julien Reichardt ca6e712ecd
xemu.appdata.xml: Add screenshots to appdata file 2023-01-18 12:17:10 -07:00
Matt Borgerson 328656dbd9 ci: Fix release double build 2023-01-17 13:09:02 -07:00
Matt Borgerson 8fbbe0f0f3 ci: Use bot to push releases and trigger site update
Apparently using the default actions token will not allow triggering
workflows. Use bot access token instead to publish the release.
2023-01-17 12:28:13 -07:00
wutno 6b0c66c6a1 ui: Add fullscreen exclusive mode 2023-01-17 10:42:06 -07:00
Matt Borgerson fd1fcc32c2 ci: Update website on release publish event 2023-01-16 17:01:01 -07:00
Matt Borgerson 70099808b1 ci: Prefix AppImage xemu version with 'v' 2023-01-16 16:41:44 -07:00
mborgerson 69ee655a76 ci: Update xemu-win64-toolchain image tag 2023-01-15 16:19:03 -07:00
Matt Borgerson 99d540a630 build: Update Windows SDL2 to 2.26.2 2023-01-15 03:36:56 -07:00
mborgerson 946c8e486b ci: Update win64 build image
Use new image builds from CI via GHCR
2023-01-14 21:30:34 -07:00
Matt Borgerson e872a95e83 ci: Fix toolchain image name, tags, labels 2023-01-14 14:22:09 -07:00
Matt Borgerson e44e78fa06 ci: Build xemu-win64-toolchain container image 2023-01-14 03:29:35 -07:00
Matt Borgerson 92b62d942f ci: Don't use /tmp with cache@v3 on macOS 2023-01-13 17:06:01 -07:00
Matt Borgerson 929f035933 ci: Unpack Ubuntu runner artifacts 2023-01-13 16:47:25 -07:00
Matt Borgerson 906784d181 ci: Fix release artifact glob 2023-01-13 16:25:43 -07:00
Matt Borgerson aedaef0265 ci: Generate AppImage 2023-01-13 15:57:02 -07:00
Matt Borgerson 7144f19ab0 xemu.appdata.xml: Create 2023-01-13 15:57:02 -07:00
Matt Borgerson ad6b0cb9db ci: Update action versions 2023-01-13 15:57:02 -07:00
Matt Borgerson a0cffd77de ci: Pin macOS runner to macOS-11 for now 2023-01-06 16:16:25 -07:00
Antonio Abbatangelo 27c99af5e3 nv2a: Set unpack alignment on surface upload 2023-01-05 13:22:18 -07:00
Antonio Abbatangelo 22db3304a4 ui: Display MCPX, BIOS MD5 hashes in About view 2022-10-11 11:35:37 -07:00
Antonio Abbatangelo 080022833d nv2a: Cache shaders to disk 2022-09-10 12:52:51 -07:00
Erik Abair f7b2acbb79 nv2a: Ensure SurfaceBinding.size can always fit surface
It is possible to specify a pitch that is smaller than the native size of a
surface (i.e., `pitch < width * bytes_per_pixel`). On hardware this is handled
gracefully, whereas in xemu it will cause buffer overruns when dealing with
swizzling/unswizzling.

Fixes #1152

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/surface_pitch_tests.cpp)
[HW Results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Surface_pitch)

Note that xemu's swizzling behavior still does not match HW with this change,
it just prevents the test from crashing.
2022-09-09 13:56:53 -07:00
Antonio Abbatangelo d219d92214 vl: Initialize usb daughterboard at machine start 2022-09-09 13:10:44 -07:00
gaasedelen 940bee452c
main-loop: Fix QEMU serial debugging on Windows 2022-08-05 11:14:23 -07:00
Erik Abair c2031108c5 nv2a: Cache texture attributes to avoid resetting unnecessarily 2022-07-25 10:44:38 -07:00
Erik Abair 5f306e749e nv2a: Apply texture parameters when reusing textures
Fixes the edge case where a texture is reusable but has modified usage
parameters (e.g., `GL_TEXTURE_WRAP_S`). Prior to this change, texture
parameters would be cached permanently until the texture was recreated.

Fixes #1034
2022-07-25 10:44:38 -07:00
Erik Abair c83b53e09d nv2a: Handles depth borders in 3D bordered textures
3D textures with texture borders have 4 layers of border on either side of the
content layers in addition to the normal 4 pixel border per layer. This change
handles those extra depth layers in roughly the same way that the per-layer
border texels are handled.

Fixes #1171

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/texture_border_tests.cpp)
[HW results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Texture_border)
2022-07-25 10:02:15 -07:00
Erik Abair 248fc788c1 nv2a: Ignore pitch check for swizzled textures 2022-07-18 18:03:48 -07:00
Erik Abair 1e221e8da9 nv2a: Fallback to recreating texture on surface size mismatch.
There is no requirement that a surface and texture using the same VRAM address
match with respect to size (in particular pitch). This change prevents
incorrect reuse of a surface binding in the event that the texture size does
not match.

Fixes #1127
2022-07-18 11:33:53 -07:00
Erik Abair ea0a906707 nv2a: Handle value in NV_PVIDEO_STOP writes
Interprets the value written to the `NV_PVIDEO_STOP` register in a manner more
consistent with hardware. Specifically, if the low bit of the value is not set,
the PVIDEO overlay should remain active.

Fixes #1049

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/pvideo_tests.cpp)
Note that, as this is testing video behavior, this test is interactive and
the value passed to the final SetPvideoStop call needs to be mutated and the
behavior observed.
2022-07-18 11:14:15 -07:00
Erik Abair f29c2ff42c nv2a: Handle PVIDEO ds_dx and dt_dy registers
ds_dx and dt_dy describe how the PVIDEO content should be scaled to fit the
output area. Each is calculated via `((in - 1) << 20) / (out - 1)`, this
commit calculates the full frame scale (in / out) and applies that when
determining the texture coordinates for the overlay.
2022-07-18 10:59:08 -07:00
Erik Abair 9fd957d950 nv2a: Add hack for NV_PVIDEO_SIZE_IN sentinel 2022-07-18 10:59:08 -07:00
Erik Abair a675666051 nv2a: Handle SIZE_IN > SIZE_OUT case
`NV_PVIDEO_SIZE_IN` is set to 0xFFFFFFFF during initialization and teardown
of the PVIDEO overlay. In some cases this can happen before the overlay is
explicitly stopped, leading to an assert. On hardware SIZE_IN values larger
than SIZE_OUT are capped (content is not scaled).

Fixes #330

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/pvideo_tests.cpp)
2022-07-18 10:59:08 -07:00
Erik Abair 8d274e5f9a nv2a: Match inv_w qualifier to attribute qualifier
Calculates both interpolated and flat shaded inv_w so that the appropriate
value may be used when undoing the perspective divide in the pixel shader.
2022-07-13 16:16:38 -07:00
Erik Abair ae1a140ecb nv2a: Fix missing flat qualifier for inv_w param
`vtx_inv_w` should also be flat, since interpolating it causes incorrect values
for the flat shaded colors.

Fixes #1179

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/shade_model_tests.cpp)
[HW results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Shade_model)
2022-07-13 16:16:38 -07:00
Erik Abair 4fd15c00f3 mcpx: Print actual error on OpenAudioDevice fail 2022-07-13 13:41:30 -07:00
Erik Abair 6f878ede01 nv2a: Do not force oFog to 1.0
This code was added ~7 years ago in
[this commit](97be3f5986)

From what I can see from the [HW test results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Fog_coord_vec4)
the behavior on nv2a is more subtle than the cited `NV_vertex_program`
documentation.

In practice the register more or less retains its value until it is explicitly
modified.[The test](4cff2b2ebe/src/tests/fog_tests.cpp (L432))
renders something with an explicitly set oFog.x, then renders again with a
shader that does not modify oFog.x but references it in the pixel shader. The
value carries over rather than being forced to 1.0.

Interestingly, this test is apparently not hermetic; running the other
vec4_coord test (that explictly set various components of oFog) lead to unusual
behavior where the fogging effect is not uniform across all vertices, despite
never being set. Even more interestingly, re-running the test once it's in this
state will often produce variations as to which vertices are apparently using
a stale/incorrect fog value.
2022-07-05 19:12:03 -07:00
Lynne 6a8a967438 nv2a/psh: fix shader compilation errors
dotSTR had an extra bracket at the end, and an incorrect
variable type.
2022-07-02 10:39:44 -07:00
Erik Abair d06a0c22f1 nv2a: Fix incorrect use of bytes for GL_UNPACK_ROW_LENGTH
`GL_UNPACK_ROW_LENGTH` is supposed to set the length in pixels, but the DXT
path is setting it to bytes, causing it to read beyond the end of the texture.
[Reference](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glPixelStore.xhtml)

Fixes #1002

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/texture_format_dxt_tests.cpp)
[HW Results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Texture_DXT)
2022-07-01 13:44:20 -07:00
mborgerson db389b1508 nv2a: Fix missing emit_vertex param 2022-06-25 22:56:11 -07:00
Alexandre Bouvier 63f48393e7 build: Allow using system xxhash 2022-06-25 22:01:40 -07:00
Matt Borgerson 83e16c996d nv2a: Store shading mode in CONTROL_3 2022-06-25 21:11:30 -07:00
Erik Abair 4132845336 nv2a: Implement SET_SHADE_MODEL 2022-06-25 20:39:55 -07:00
Erik Abair 0d84befb82 nv2a: Implement support for border textures 2022-06-25 18:08:55 -07:00
Matt Borgerson 8e48115a41 ui: Set C numeric locale before settings save/load 2022-06-25 15:34:26 -07:00
Matt Borgerson be8b612186 nv2a: Set C numeric locale before shader gen 2022-06-25 15:34:26 -07:00