Skip to content

Commit 58ec7c1

Browse files
authored
Merge branch 'xemu-project:master' into integer-scaling
2 parents 39c3c13 + aa496f8 commit 58ec7c1

File tree

9 files changed

+44
-26
lines changed

9 files changed

+44
-26
lines changed

.github/workflows/build-xemu-win64-toolchain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Clone tree
24-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
24+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v4
2525
- name: Extract image metadata (tags, labels)
2626
id: meta
2727
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Clone tree
23-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
23+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v4
2424
with:
2525
fetch-depth: 0
2626
- name: Install dependencies

.github/workflows/bump-subproject-wraps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
name: "Bump Meson subprojects"
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
17+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v4
1818

1919
- name: Install the latest version of uv
20-
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v6
20+
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v6
2121
with:
2222
enable-cache: false
2323

hw/xbox/nv2a/nv2a_regs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@
10491049
# define NV097_SET_TEXGEN_Q 0x000003CC
10501050
# define NV097_SET_TEXTURE_MATRIX_ENABLE 0x00000420
10511051
# define NV097_SET_POINT_SIZE 0x0000043C
1052-
# define NV097_SET_POINT_SIZE_V 0x000001FF
1052+
# define NV097_SET_POINT_SIZE_V_MAX 0x1FF
10531053
# define NV097_SET_PROJECTION_MATRIX 0x00000440
10541054
# define NV097_SET_MODEL_VIEW_MATRIX 0x00000480
10551055
# define NV097_SET_INVERSE_MODEL_VIEW_MATRIX 0x00000580

hw/xbox/nv2a/pgraph/glsl/vsh-ff.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ GLSL_DEFINE(materialEmissionColor, GLSL_LTCTXA(NV_IGRAPH_XF_LTCTXA_CM_COL) ".xyz
500500
" oPts.x = clamp(oPts.x * pointParams[3] + pointParams[7], ptMinSize, ptMaxSize) * %d;\n",
501501
state->surface_scale_factor);
502502
} else {
503-
mstring_append_fmt(body, " oPts.x = %f * %d;\n", state->point_size,
503+
mstring_append_fmt(body, " oPts.x = %f * %d;\n",
504+
MAX(1.f, state->point_size),
504505
state->surface_scale_factor);
505506
}
506507
}

hw/xbox/nv2a/pgraph/glsl/vsh.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ void pgraph_glsl_set_vsh_state(PGRAPHState *pg, VshState *vsh)
130130

131131
vsh->point_params_enable = GET_MASK(pgraph_reg_r(pg, NV_PGRAPH_CSV0_D),
132132
NV_PGRAPH_CSV0_D_POINTPARAMSENABLE);
133-
vsh->point_size = GET_MASK(pgraph_reg_r(pg, NV_PGRAPH_POINTSIZE),
134-
NV097_SET_POINT_SIZE_V) /
135-
8.0f;
133+
vsh->point_size = pgraph_reg_r(pg, NV_PGRAPH_POINTSIZE) / 8.0f;
136134
if (vsh->point_params_enable) {
137135
for (int i = 0; i < 8; i++) {
138136
vsh->point_params[i] = pg->point_params[i];
@@ -306,6 +304,12 @@ MString *pgraph_glsl_gen_vsh(const VshState *state, GenVshGlslOptions opts)
306304
pgraph_glsl_gen_vsh_prog(
307305
VSH_VERSION_XVS, (uint32_t *)state->programmable.program_data,
308306
state->programmable.program_length, header, body);
307+
if (!state->point_params_enable) {
308+
mstring_append_fmt(body, " oPts.x = %f * %d;\n",
309+
state->point_size <= 0.f ? 1.f :
310+
state->point_size,
311+
state->surface_scale_factor);
312+
}
309313
}
310314

311315
if (!state->fog_enable) {

hw/xbox/nv2a/pgraph/pgraph.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,11 @@ DEF_METHOD_INC(NV097, SET_TEXTURE_MATRIX_ENABLE)
17291729

17301730
DEF_METHOD(NV097, SET_POINT_SIZE)
17311731
{
1732-
PG_SET_MASK(NV_PGRAPH_POINTSIZE, NV097_SET_POINT_SIZE_V, parameter);
1732+
if (parameter > NV097_SET_POINT_SIZE_V_MAX) {
1733+
return;
1734+
}
1735+
1736+
pgraph_reg_w(pg, NV_PGRAPH_POINTSIZE, parameter);
17331737
}
17341738

17351739
DEF_METHOD_INC(NV097, SET_PROJECTION_MATRIX)

ui/xemu.desktop

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ Name=xemu
77
Comment=Emulator for the original Xbox console
88
Icon=xemu
99
Categories=Game;Emulator;
10+
Keywords=original;xbox;game;console;emulator;xemu;

xemu.metainfo.xml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,56 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<component type="desktop-application">
33
<id>app.xemu.xemu</id>
4-
54
<name>xemu</name>
65
<summary>Original Xbox Emulator</summary>
7-
86
<metadata_license>CC0-1.0</metadata_license>
97
<project_license>GPL-2.0-only</project_license>
10-
118
<supports>
129
<control>pointing</control>
1310
<control>keyboard</control>
1411
<control>gamepad</control>
1512
</supports>
16-
1713
<description>
1814
<p>
1915
A free and open-source application that emulates the original Microsoft Xbox game console. Supports connecting up to 4 controllers for local play, networking for multiplayer, resolution scaling, and more.
2016
</p>
2117
</description>
22-
2318
<screenshots>
24-
<screenshot type="default"><image>https://xemu.app/screenshots/0.png</image></screenshot>
25-
<screenshot><image>https://xemu.app/screenshots/1.png</image></screenshot>
26-
<screenshot><image>https://xemu.app/screenshots/2.png</image></screenshot>
27-
<screenshot><image>https://xemu.app/screenshots/3.png</image></screenshot>
28-
<screenshot><image>https://xemu.app/screenshots/4.png</image></screenshot>
29-
<screenshot><image>https://xemu.app/screenshots/5.png</image></screenshot>
19+
<screenshot type="default">
20+
<image>https://xemu.app/screenshots/0.png</image>
21+
<caption>"Xbox Dashboard" running in xemu</caption>
22+
</screenshot>
23+
<screenshot>
24+
<image>https://xemu.app/screenshots/1.png</image>
25+
<caption>"Halo: Combat Evolved" (Campaign) running in xemu</caption>
26+
</screenshot>
27+
<screenshot>
28+
<image>https://xemu.app/screenshots/2.png</image>
29+
<caption>"Fuzion Frenzy" running in xemu</caption>
30+
</screenshot>
31+
<screenshot>
32+
<image>https://xemu.app/screenshots/3.png</image>
33+
<caption>"Halo: Combat Evolved" (Multiplayer) running in xemu</caption>
34+
</screenshot>
35+
<screenshot>
36+
<image>https://xemu.app/screenshots/4.png</image>
37+
<caption>"Tony Hawk's Pro Skater 2x" running in xemu</caption>
38+
</screenshot>
39+
<screenshot>
40+
<image>https://xemu.app/screenshots/5.png</image>
41+
<caption>xemu Settings Menu</caption>
42+
</screenshot>
3043
</screenshots>
31-
3244
<categories>
3345
<category>Game</category>
3446
<category>Emulator</category>
3547
</categories>
36-
3748
<content_rating type="oars-1.1"/>
38-
3949
<url type="homepage">https://xemu.app</url>
4050
<url type="bugtracker">https://github.com/xemu-project/xemu/issues</url>
4151
<url type="help">https://xemu.app/docs</url>
4252
<url type="faq">https://xemu.app/docs/faq</url>
43-
4453
<launchable type="desktop-id">xemu.desktop</launchable>
45-
4654
<provides>
4755
<binary>xemu</binary>
4856
</provides>

0 commit comments

Comments
 (0)