Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
BiatuAutMiahn committed May 26, 2024
2 parents c00d3d5 + 2be220d commit 3225b35
Show file tree
Hide file tree
Showing 20 changed files with 682 additions and 95 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-xemu-win64-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone tree
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Extract image metadata (tags, labels)
id: meta
uses: docker/metadata-action@v4.3.0
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
Expand All @@ -35,16 +35,16 @@ jobs:
type=ref,event=branch
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.2.1
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v3.2.0
uses: docker/build-push-action@v5
with:
context: ubuntu-win64-cross
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone tree
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
# On push to master, increment patch version and create a new tag on release
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
./scripts/archive-source.sh src.tar
gzip -1 src.tar
- name: Upload source package artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: src.tar.gz
path: src.tar.gz
Expand All @@ -71,14 +71,14 @@ jobs:

steps:
- name: Download source package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: src.tar.gz
- name: Extract source package
run: tar xf src.tar.gz
- name: Initialize compiler cache
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/xemu-ccache
key: cache-wincross-${{ runner.os }}-${{ matrix.configuration }}-${{ github.sha }}
Expand All @@ -97,7 +97,7 @@ jobs:
$DOCKER_IMAGE_NAME \
bash -c "ccache -z; ./build.sh -p win64-cross ${{ matrix.build_param }} && ccache -s"
- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: dist
Expand All @@ -118,7 +118,7 @@ jobs:
artifact_name: xemu-win-release
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}
Expand All @@ -132,7 +132,7 @@ jobs:
7z a -tzip ../dist/${{ matrix.artifact_name }}.zip * "-xr!*.pdb"
7z a -tzip ../dist/${{ matrix.artifact_name }}-pdb.zip "-ir!*.pdb"
- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}-pdb
path: dist
Expand All @@ -155,21 +155,21 @@ jobs:
steps:
- name: Initialize compiler cache
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/xemu-ccache
key: cache-${{ runner.os }}-${{ matrix.configuration }}-${{ github.sha }}
restore-keys: cache-${{ runner.os }}-${{ matrix.configuration }}-
- name: Download source package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: src.tar.gz
- name: Extract source package
run: |
mkdir src
tar -C src -xf src.tar.gz
- name: Clone Debian packaging
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: deb
path: debian-tmp
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
ar x dist/*.deb
mkdir appimage
tar -C appimage -xf data.tar*
install -DT src/xemu.appdata.xml appimage/usr/share/metainfo/xemu.appdata.xml
install -DT src/xemu.metainfo.xml appimage/usr/share/metainfo/xemu.metainfo.xml
export VERSION=v$(cat src/XEMU_VERSION)
if [[ "${{ matrix.configuration }}" == "Debug" ]]; then
Expand All @@ -232,7 +232,7 @@ jobs:
run: |
tar -czvf ${{ matrix.artifact_filename }} --transform "s#^dist#xemu#" dist
- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_filename }}
Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:
artifact_filename: xemu-macos-arm64-release.zip
steps:
- name: Download source package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: src.tar.gz
- name: Extract source package
Expand All @@ -284,7 +284,7 @@ jobs:
python3 -m pip install pyyaml requests
- name: Initialize compiler, library cache
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
xemu-ccache
Expand All @@ -304,7 +304,7 @@ jobs:
zip -r ../${{ matrix.artifact_filename }} *
popd
- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_filename }}
Expand All @@ -318,12 +318,12 @@ jobs:
configuration: ["debug", "release"]
steps:
- name: Download x86_64 build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: xemu-macos-x86_64-${{ matrix.configuration }}
path: xemu-macos-x86_64-${{ matrix.configuration }}
- name: Download arm64 build
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: xemu-macos-arm64-${{ matrix.configuration }}
path: xemu-macos-arm64-${{ matrix.configuration }}
Expand All @@ -347,7 +347,7 @@ jobs:
zip -r ../xemu-macos-universal-${{ matrix.configuration }}.zip *
popd
- name: Upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: xemu-macos-universal-${{ matrix.configuration }}
path: xemu-macos-universal-${{ matrix.configuration }}.zip
Expand All @@ -358,7 +358,7 @@ jobs:
needs: [Ubuntu, macOSUniversal, WindowsPdb]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: dist
- name: Extract source package
Expand Down Expand Up @@ -411,15 +411,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download source package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: src.tar.gz
- name: Extract source package
run: |
mkdir src
tar -C src -xf src.tar.gz
- name: Clone Debian packaging
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: deb
path: debian-tmp
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ case "$platform" in # Adjust compilation options based on platform
CYGWIN*|MINGW*|MSYS*)
echo 'Compiling for Windows...'
sys_cflags='-Wno-error'
CFLAGS="${CFLAGS} -lIphlpapi -lCrypt32" # workaround for linking libs on mingw
opts="$opts --disable-fortify-source"
postbuild='package_windows' # set the above function to be called after build
target="qemu-system-i386w.exe"
Expand Down
21 changes: 21 additions & 0 deletions config_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ input:
port2: string
port3: string
port4: string
peripherals:
port1:
peripheral_type_0: integer
peripheral_param_0: string
peripheral_type_1: integer
peripheral_param_1: string
port2:
peripheral_type_0: integer
peripheral_param_0: string
peripheral_type_1: integer
peripheral_param_1: string
port3:
peripheral_type_0: integer
peripheral_param_0: string
peripheral_type_1: integer
peripheral_param_1: string
port4:
peripheral_type_0: integer
peripheral_param_0: string
peripheral_type_1: integer
peripheral_param_1: string
gamecontrollerdb_path: string
auto_bind:
type: bool
Expand Down
1 change: 1 addition & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pfiles = [
'controller_mask.png',
'xmu_mask.png',
'logo_sdf.png',
'xemu_64x64.png',
'abxy.ttf',
Expand Down
Binary file added data/xmu_mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 27 additions & 21 deletions hw/xbox/nv2a/psh.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,29 +728,35 @@ static MString* psh_convert(struct PixelShader *ps)
" if (x >= 0) return x/2;\n"
" else return 1+x/2;\n"
"}\n"
"vec3 dotmap_zero_to_one(vec3 col) {\n"
" return col;\n"
"vec3 dotmap_zero_to_one(vec4 col) {\n"
" return col.rgb;\n"
"}\n"
"vec3 dotmap_minus1_to_1_d3d(vec3 col) {\n"
"vec3 dotmap_minus1_to_1_d3d(vec4 col) {\n"
" return vec3(sign1(col.r),sign1(col.g),sign1(col.b));\n"
"}\n"
"vec3 dotmap_minus1_to_1_gl(vec3 col) {\n"
"vec3 dotmap_minus1_to_1_gl(vec4 col) {\n"
" return vec3(sign2(col.r),sign2(col.g),sign2(col.b));\n"
"}\n"
"vec3 dotmap_minus1_to_1(vec3 col) {\n"
"vec3 dotmap_minus1_to_1(vec4 col) {\n"
" return vec3(sign3(col.r),sign3(col.g),sign3(col.b));\n"
"}\n"
"vec3 dotmap_hilo_1(vec3 col) {\n"
" return col;\n" // FIXME
"vec3 dotmap_hilo_1(vec4 col) {\n"
" uint hi_i = uint(col.a * float(0xff)) << 8\n"
" | uint(col.r * float(0xff));\n"
" uint lo_i = uint(col.g * float(0xff)) << 8\n"
" | uint(col.b * float(0xff));\n"
" float hi_f = float(hi_i) / float(0xffff);\n"
" float lo_f = float(lo_i) / float(0xffff);\n"
" return vec3(hi_f, lo_f, 1.0);\n"
"}\n"
"vec3 dotmap_hilo_hemisphere_d3d(vec3 col) {\n"
" return col;\n" // FIXME
"vec3 dotmap_hilo_hemisphere_d3d(vec4 col) {\n"
" return col.rgb;\n" // FIXME
"}\n"
"vec3 dotmap_hilo_hemisphere_gl(vec3 col) {\n"
" return col;\n" // FIXME
"vec3 dotmap_hilo_hemisphere_gl(vec4 col) {\n"
" return col.rgb;\n" // FIXME
"}\n"
"vec3 dotmap_hilo_hemisphere(vec3 col) {\n"
" return col;\n" // FIXME
"vec3 dotmap_hilo_hemisphere(vec4 col) {\n"
" return col.rgb;\n" // FIXME
"}\n"
"const float[9] gaussian3x3 = float[9](\n"
" 1.0/16.0, 2.0/16.0, 1.0/16.0,\n"
Expand Down Expand Up @@ -950,7 +956,7 @@ static MString* psh_convert(struct PixelShader *ps)
assert(i >= 2);
mstring_append_fmt(vars, "/* PS_TEXTUREMODES_DOT_ST */\n");
mstring_append_fmt(vars,
"float dot%d = dot(pT%d.xyz, %s(t%d.rgb));\n"
"float dot%d = dot(pT%d.xyz, %s(t%d));\n"
"vec2 dotST%d = vec2(dot%d, dot%d);\n",
i, i, dotmap_func, ps->input_tex[i], i, i-1, i);

Expand All @@ -961,18 +967,18 @@ static MString* psh_convert(struct PixelShader *ps)
case PS_TEXTUREMODES_DOT_ZW:
assert(i >= 2);
mstring_append_fmt(vars, "/* PS_TEXTUREMODES_DOT_ZW */\n");
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d.rgb));\n",
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d));\n",
i, i, dotmap_func, ps->input_tex[i]);
mstring_append_fmt(vars, "vec4 t%d = vec4(0.0);\n", i);
// FIXME: mstring_append_fmt(vars, "gl_FragDepth = t%d.x;\n", i);
break;
case PS_TEXTUREMODES_DOT_RFLCT_DIFF:
assert(i == 2);
mstring_append_fmt(vars, "/* PS_TEXTUREMODES_DOT_RFLCT_DIFF */\n");
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d.rgb));\n",
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d));\n",
i, i, dotmap_func, ps->input_tex[i]);
assert(ps->dot_map[i+1] < 8);
mstring_append_fmt(vars, "float dot%d_n = dot(pT%d.xyz, %s(t%d.rgb));\n",
mstring_append_fmt(vars, "float dot%d_n = dot(pT%d.xyz, %s(t%d));\n",
i, i+1, dotmap_funcs[ps->dot_map[i+1]], ps->input_tex[i+1]);
mstring_append_fmt(vars, "vec3 n_%d = vec3(dot%d, dot%d, dot%d_n);\n",
i, i-1, i, i);
Expand All @@ -983,7 +989,7 @@ static MString* psh_convert(struct PixelShader *ps)
case PS_TEXTUREMODES_DOT_RFLCT_SPEC:
assert(i == 3);
mstring_append_fmt(vars, "/* PS_TEXTUREMODES_DOT_RFLCT_SPEC */\n");
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d.rgb));\n",
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d));\n",
i, i, dotmap_func, ps->input_tex[i]);
mstring_append_fmt(vars, "vec3 n_%d = vec3(dot%d, dot%d, dot%d);\n",
i, i-2, i-1, i);
Expand All @@ -999,7 +1005,7 @@ static MString* psh_convert(struct PixelShader *ps)
assert(i == 3);
mstring_append_fmt(vars, "/* PS_TEXTUREMODES_DOT_STR_3D */\n");
mstring_append_fmt(vars,
"float dot%d = dot(pT%d.xyz, %s(t%d.rgb));\n"
"float dot%d = dot(pT%d.xyz, %s(t%d));\n"
"vec3 dotSTR%d = vec3(dot%d, dot%d, dot%d);\n",
i, i, dotmap_func, ps->input_tex[i],
i, i-2, i-1, i);
Expand All @@ -1011,7 +1017,7 @@ static MString* psh_convert(struct PixelShader *ps)
case PS_TEXTUREMODES_DOT_STR_CUBE:
assert(i == 3);
mstring_append_fmt(vars, "/* PS_TEXTUREMODES_DOT_STR_CUBE */\n");
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d.rgb));\n",
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d));\n",
i, i, dotmap_func, ps->input_tex[i]);
mstring_append_fmt(vars, "vec3 dotSTR%dCube = vec3(dot%d, dot%d, dot%d);\n",
i, i-2, i-1, i);
Expand All @@ -1038,7 +1044,7 @@ static MString* psh_convert(struct PixelShader *ps)
case PS_TEXTUREMODES_DOTPRODUCT:
assert(i == 1 || i == 2);
mstring_append_fmt(vars, "/* PS_TEXTUREMODES_DOTPRODUCT */\n");
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d.rgb));\n",
mstring_append_fmt(vars, "float dot%d = dot(pT%d.xyz, %s(t%d));\n",
i, i, dotmap_func, ps->input_tex[i]);
mstring_append_fmt(vars, "vec4 t%d = vec4(0.0);\n", i);
break;
Expand Down
Loading

0 comments on commit 3225b35

Please sign in to comment.