diff --git a/.gitmodules b/.gitmodules index 699d5526f7..43b686a804 100644 --- a/.gitmodules +++ b/.gitmodules @@ -82,3 +82,6 @@ [submodule "tomlplusplus"] path = tomlplusplus url = https://github.com/marzer/tomlplusplus +[submodule "hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu"] + path = hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu + url = https://github.com/abaire/nv2a_vsh_cpu.git diff --git a/configure b/configure index 34fea06dba..9a4cd7f789 100755 --- a/configure +++ b/configure @@ -261,7 +261,7 @@ else git_submodules_action="ignore" fi -git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot util/xxHash tomlplusplus genconfig" +git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot util/xxHash tomlplusplus genconfig hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu" git="git" # Don't accept a target_list environment variable. diff --git a/hw/xbox/nv2a/meson.build b/hw/xbox/nv2a/meson.build index 871ba02457..d3b159a3bc 100644 --- a/hw/xbox/nv2a/meson.build +++ b/hw/xbox/nv2a/meson.build @@ -22,3 +22,6 @@ specific_ss.add(files( 's3tc.c', )) subdir('gl') + +subdir('thirdparty') +specific_ss.add(nv2a_vsh_cpu) diff --git a/hw/xbox/nv2a/thirdparty/meson.build b/hw/xbox/nv2a/thirdparty/meson.build new file mode 100644 index 0000000000..ec4068a77c --- /dev/null +++ b/hw/xbox/nv2a/thirdparty/meson.build @@ -0,0 +1,12 @@ +nv2a_vsh_cpu_files = files( + 'nv2a_vsh_cpu/src/nv2a_vsh_cpu.c', + 'nv2a_vsh_cpu/src/nv2a_vsh_disassembler.c', + 'nv2a_vsh_cpu/src/nv2a_vsh_emulator.c', + 'nv2a_vsh_cpu/src/nv2a_vsh_emulator_execution_state.c', +) + +libnv2a_vsh_cpu = static_library('nv2a_vsh_cpu', + sources: nv2a_vsh_cpu_files, + include_directories: ['.', 'nv2a_vsh_cpu/src']) +nv2a_vsh_cpu = declare_dependency(link_with: libnv2a_vsh_cpu, + include_directories: ['nv2a_vsh_cpu/src']) diff --git a/hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu b/hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu new file mode 160000 index 0000000000..89e6ec8526 --- /dev/null +++ b/hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu @@ -0,0 +1 @@ +Subproject commit 89e6ec852601b77f3c097014af4d29720ab59721 diff --git a/licenses/nv2a_vsh_cpu.license.txt b/licenses/nv2a_vsh_cpu.license.txt new file mode 100644 index 0000000000..fdddb29aa4 --- /dev/null +++ b/licenses/nv2a_vsh_cpu.license.txt @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index debb1d344d..b38bb2726a 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -29,6 +29,7 @@ sub_file="${sub_tdir}/submodule.tar" submodules="dtc slirp meson ui/keycodemapdb" submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot util/xxHash tomlplusplus genconfig" # xemu extras +submodules="$submodules hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu" sub_deinit="" function cleanup() { diff --git a/scripts/gen-license.py b/scripts/gen-license.py index 66ec79cb98..cc11d110d1 100755 --- a/scripts/gen-license.py +++ b/scripts/gen-license.py @@ -225,6 +225,12 @@ def head(self): version='6926f5a0a78f22d42b074a0ab8032e07736babd4' ), +Lib('nv2a_vsh_cpu', 'https://github.com/abaire/nv2a_vsh_cpu', + unlicense, 'https://raw.githubusercontent.com/abaire/nv2a_vsh_cpu/main/LICENSE', + ships_static=all_platforms, + submodule=Submodule('hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu') + ), + # # Data files included with xemu #