├── .clang-format ├── .codacy.yaml ├── .drone.star ├── .gdbinit ├── .gitattributes ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ └── config.yml └── workflows │ ├── Create_release.yml │ ├── Linux_build.yml │ └── Windows_build.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── android └── android_studio_project │ ├── .gitignore │ ├── app │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── jp │ │ │ └── xenia │ │ │ ├── XeniaRuntimeException.java │ │ │ └── emulator │ │ │ ├── GpuTraceViewerActivity.java │ │ │ ├── LauncherActivity.java │ │ │ ├── WindowDemoActivity.java │ │ │ ├── WindowSurfaceView.java │ │ │ └── WindowedAppActivity.java │ │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ ├── activity_gpu_trace_viewer.xml │ │ ├── activity_launcher.xml │ │ └── activity_window_demo.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ └── strings.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── assets ├── discord │ └── app.png ├── icon │ ├── 1024.png │ ├── 128.png │ ├── 16.png │ ├── 256.png │ ├── 32.png │ ├── 48.png │ ├── 512.png │ ├── 64.png │ ├── LICENSE │ ├── extra │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 144.png │ │ ├── 150.png │ │ ├── 152.png │ │ ├── 180.png │ │ ├── 192.png │ │ ├── 310.png │ │ ├── 36.png │ │ ├── 57.png │ │ ├── 60.png │ │ ├── 70.png │ │ ├── 72.png │ │ ├── 76.png │ │ └── 96.png │ └── icon.ico └── icons │ ├── pause.png │ ├── play.png │ ├── step_in.bmp │ ├── step_out.bmp │ ├── step_over.bmp │ └── stop.png ├── docs ├── building.md ├── cpu.md ├── cpu_todo.md ├── gpu.md ├── images │ ├── CPU-JIT.png │ └── shader_playground.png ├── instruction_tracing.md ├── kernel.md ├── ppc │ ├── altivec_instructions.pdf │ ├── core_instructions.pdf │ └── vmx128.txt └── style_guide.md ├── premake5.lua ├── src └── xenia │ ├── app │ ├── discord │ │ ├── discord_presence.cc │ │ ├── discord_presence.h │ │ └── premake5.lua │ ├── emulator_window.cc │ ├── emulator_window.h │ ├── main_resources.rc │ ├── premake5.lua │ ├── profile_dialogs.cc │ ├── profile_dialogs.h │ └── xenia_main.cc │ ├── apu │ ├── apu_flags.cc │ ├── apu_flags.h │ ├── audio_driver.cc │ ├── audio_driver.h │ ├── audio_media_player.cc │ ├── audio_media_player.h │ ├── audio_system.cc │ ├── audio_system.h │ ├── conversion.h │ ├── debug_visualizers.natvis │ ├── nop │ │ ├── nop_audio_system.cc │ │ ├── nop_audio_system.h │ │ └── premake5.lua │ ├── premake5.lua │ ├── sdl │ │ ├── premake5.lua │ │ ├── sdl_audio_driver.cc │ │ ├── sdl_audio_driver.h │ │ ├── sdl_audio_system.cc │ │ └── sdl_audio_system.h │ ├── xaudio2 │ │ ├── premake5.lua │ │ ├── xaudio2_api.h │ │ ├── xaudio2_audio_driver.cc │ │ ├── xaudio2_audio_driver.h │ │ ├── xaudio2_audio_system.cc │ │ └── xaudio2_audio_system.h │ ├── xma_context.cc │ ├── xma_context.h │ ├── xma_context_new.cc │ ├── xma_context_new.h │ ├── xma_context_old.cc │ ├── xma_context_old.h │ ├── xma_decoder.cc │ ├── xma_decoder.h │ ├── xma_helpers.h │ ├── xma_register_file.cc │ ├── xma_register_file.h │ └── xma_register_table.inc │ ├── base │ ├── README.md │ ├── app_win32.manifest │ ├── arena.cc │ ├── arena.h │ ├── assert.h │ ├── atomic.h │ ├── bit_map.cc │ ├── bit_map.h │ ├── bit_range.h │ ├── bit_stream.cc │ ├── bit_stream.h │ ├── byte_order.h │ ├── byte_stream.cc │ ├── byte_stream.h │ ├── chrono.h │ ├── chrono_steady_cast.h │ ├── clock.cc │ ├── clock.h │ ├── clock_posix.cc │ ├── clock_win.cc │ ├── clock_x64.cc │ ├── console.h │ ├── console_app_main.h │ ├── console_app_main_android.cc │ ├── console_app_main_posix.cc │ ├── console_app_main_win.cc │ ├── console_posix.cc │ ├── console_win.cc │ ├── cvar.cc │ ├── cvar.h │ ├── cvar_android.cc │ ├── debug_visualizers.natvis │ ├── debugging.h │ ├── debugging_mac.cc │ ├── debugging_posix.cc │ ├── debugging_win.cc │ ├── delegate.h │ ├── exception_handler.cc │ ├── exception_handler.h │ ├── exception_handler_posix.cc │ ├── exception_handler_win.cc │ ├── filesystem.cc │ ├── filesystem.h │ ├── filesystem_android.cc │ ├── filesystem_posix.cc │ ├── filesystem_wildcard.cc │ ├── filesystem_wildcard.h │ ├── filesystem_win.cc │ ├── fuzzy.cc │ ├── fuzzy.h │ ├── hash.h │ ├── host_thread_context.cc │ ├── host_thread_context.h │ ├── literals.h │ ├── logging.cc │ ├── logging.h │ ├── main_android.cc │ ├── main_android.h │ ├── main_init_posix.cc │ ├── main_init_win.cc │ ├── main_win.cc │ ├── main_win.h │ ├── mapped_memory.h │ ├── mapped_memory_posix.cc │ ├── mapped_memory_win.cc │ ├── math.h │ ├── memory.cc │ ├── memory.h │ ├── memory_posix.cc │ ├── memory_win.cc │ ├── mutex.cc │ ├── mutex.h │ ├── platform.h │ ├── platform_amd64.cc │ ├── platform_amd64.h │ ├── platform_linux.h │ ├── platform_win.h │ ├── premake5.lua │ ├── profiling.cc │ ├── profiling.h │ ├── reset_scope.h │ ├── ring_buffer.cc │ ├── ring_buffer.h │ ├── simple_freelist.h │ ├── socket.h │ ├── socket_win.cc │ ├── split_map.h │ ├── string.cc │ ├── string.h │ ├── string_buffer.cc │ ├── string_buffer.h │ ├── string_key.h │ ├── string_util.h │ ├── system.h │ ├── system_android.cc │ ├── system_gnulinux.cc │ ├── system_win.cc │ ├── testing │ │ ├── chrono_test.cc │ │ ├── memory_test.cc │ │ ├── premake5.lua │ │ ├── threading_test.cc │ │ └── utf8_test.cc │ ├── threading.cc │ ├── threading.h │ ├── threading_mac.cc │ ├── threading_posix.cc │ ├── threading_timer_queue.cc │ ├── threading_timer_queue.h │ ├── threading_win.cc │ ├── type_pool.h │ ├── utf8.cc │ ├── utf8.h │ ├── vec128.cc │ ├── vec128.h │ └── xxhash.h │ ├── config.cc │ ├── config.h │ ├── cpp.hint │ ├── cpu │ ├── backend │ │ ├── assembler.cc │ │ ├── assembler.h │ │ ├── backend.cc │ │ ├── backend.h │ │ ├── code_cache.h │ │ ├── machine_info.h │ │ ├── null_backend.cc │ │ ├── null_backend.h │ │ └── x64 │ │ │ ├── premake5.lua │ │ │ ├── x64_amdfx_extensions.h │ │ │ ├── x64_assembler.cc │ │ │ ├── x64_assembler.h │ │ │ ├── x64_backend.cc │ │ │ ├── x64_backend.h │ │ │ ├── x64_code_cache.cc │ │ │ ├── x64_code_cache.h │ │ │ ├── x64_code_cache_posix.cc │ │ │ ├── x64_code_cache_win.cc │ │ │ ├── x64_emitter.cc │ │ │ ├── x64_emitter.h │ │ │ ├── x64_function.cc │ │ │ ├── x64_function.h │ │ │ ├── x64_op.h │ │ │ ├── x64_seq_control.cc │ │ │ ├── x64_seq_memory.cc │ │ │ ├── x64_seq_vector.cc │ │ │ ├── x64_sequences.cc │ │ │ ├── x64_sequences.h │ │ │ ├── x64_stack_layout.h │ │ │ ├── x64_tracers.cc │ │ │ ├── x64_tracers.h │ │ │ └── x64_util.h │ ├── breakpoint.cc │ ├── breakpoint.h │ ├── compiler │ │ ├── compiler.cc │ │ ├── compiler.h │ │ ├── compiler_pass.cc │ │ ├── compiler_pass.h │ │ ├── compiler_passes.h │ │ └── passes │ │ │ ├── conditional_group_pass.cc │ │ │ ├── conditional_group_pass.h │ │ │ ├── conditional_group_subpass.cc │ │ │ ├── conditional_group_subpass.h │ │ │ ├── constant_propagation_pass.cc │ │ │ ├── constant_propagation_pass.h │ │ │ ├── context_promotion_pass.cc │ │ │ ├── context_promotion_pass.h │ │ │ ├── control_flow_analysis_pass.cc │ │ │ ├── control_flow_analysis_pass.h │ │ │ ├── control_flow_simplification_pass.cc │ │ │ ├── control_flow_simplification_pass.h │ │ │ ├── data_flow_analysis_pass.cc │ │ │ ├── data_flow_analysis_pass.h │ │ │ ├── dead_code_elimination_pass.cc │ │ │ ├── dead_code_elimination_pass.h │ │ │ ├── finalization_pass.cc │ │ │ ├── finalization_pass.h │ │ │ ├── memory_sequence_combination_pass.cc │ │ │ ├── memory_sequence_combination_pass.h │ │ │ ├── register_allocation_pass.cc │ │ │ ├── register_allocation_pass.h │ │ │ ├── simplification_pass.cc │ │ │ ├── simplification_pass.h │ │ │ ├── validation_pass.cc │ │ │ ├── validation_pass.h │ │ │ ├── value_reduction_pass.cc │ │ │ └── value_reduction_pass.h │ ├── cpu_flags.cc │ ├── cpu_flags.h │ ├── debug_listener.h │ ├── elf_module.cc │ ├── elf_module.h │ ├── entry_table.cc │ ├── entry_table.h │ ├── export_resolver.cc │ ├── export_resolver.h │ ├── function.cc │ ├── function.h │ ├── function_debug_info.cc │ ├── function_debug_info.h │ ├── function_trace_data.h │ ├── hir │ │ ├── block.cc │ │ ├── block.h │ │ ├── hir_builder.cc │ │ ├── hir_builder.h │ │ ├── instr.cc │ │ ├── instr.h │ │ ├── label.h │ │ ├── opcodes.cc │ │ ├── opcodes.h │ │ ├── opcodes.inl │ │ ├── value.cc │ │ └── value.h │ ├── lzx.cc │ ├── lzx.h │ ├── mmio_handler.cc │ ├── mmio_handler.h │ ├── module.cc │ ├── module.h │ ├── ppc │ │ ├── ppc_context.cc │ │ ├── ppc_context.h │ │ ├── ppc_decode_data.h │ │ ├── ppc_emit-private.h │ │ ├── ppc_emit.h │ │ ├── ppc_emit_altivec.cc │ │ ├── ppc_emit_alu.cc │ │ ├── ppc_emit_control.cc │ │ ├── ppc_emit_fpu.cc │ │ ├── ppc_emit_memory.cc │ │ ├── ppc_frontend.cc │ │ ├── ppc_frontend.h │ │ ├── ppc_hir_builder.cc │ │ ├── ppc_hir_builder.h │ │ ├── ppc_instr.h │ │ ├── ppc_opcode.h │ │ ├── ppc_opcode_disasm.cc │ │ ├── ppc_opcode_disasm.h │ │ ├── ppc_opcode_disasm_gen.cc │ │ ├── ppc_opcode_info.cc │ │ ├── ppc_opcode_info.h │ │ ├── ppc_opcode_lookup_gen.cc │ │ ├── ppc_opcode_table_gen.cc │ │ ├── ppc_scanner.cc │ │ ├── ppc_scanner.h │ │ ├── ppc_translator.cc │ │ ├── ppc_translator.h │ │ └── testing │ │ │ ├── README.md │ │ │ ├── instr_add.s │ │ │ ├── instr_addc.s │ │ │ ├── instr_adde.s │ │ │ ├── instr_addic.s │ │ │ ├── instr_addis.s │ │ │ ├── instr_addme.s │ │ │ ├── instr_addze.s │ │ │ ├── instr_and.s │ │ │ ├── instr_andc.s │ │ │ ├── instr_andi.s │ │ │ ├── instr_andis.s │ │ │ ├── instr_cmp.s │ │ │ ├── instr_cmpi.s │ │ │ ├── instr_cmpl.s │ │ │ ├── instr_cmpli.s │ │ │ ├── instr_cntlzd.s │ │ │ ├── instr_cntlzw.s │ │ │ ├── instr_divd.s │ │ │ ├── instr_divdu.s │ │ │ ├── instr_divw.s │ │ │ ├── instr_divwu.s │ │ │ ├── instr_eqv.s │ │ │ ├── instr_extsb.s │ │ │ ├── instr_extsh.s │ │ │ ├── instr_extsw.s │ │ │ ├── instr_fabs.s │ │ │ ├── instr_fadd.s │ │ │ ├── instr_fctixz.s │ │ │ ├── instr_fmadd.s │ │ │ ├── instr_fmadds.s │ │ │ ├── instr_fmul.s │ │ │ ├── instr_fnabs.s │ │ │ ├── instr_frsqrte.s │ │ │ ├── instr_fsel.s │ │ │ ├── instr_fsqrt.s │ │ │ ├── instr_lvexx.s │ │ │ ├── instr_lvl.s │ │ │ ├── instr_lvr.s │ │ │ ├── instr_lvsl.s │ │ │ ├── instr_lvsr.s │ │ │ ├── instr_mulhd.s │ │ │ ├── instr_mulhdu.s │ │ │ ├── instr_mulhw.s │ │ │ ├── instr_mulhwu.s │ │ │ ├── instr_mulld.s │ │ │ ├── instr_mulli.s │ │ │ ├── instr_mullw.s │ │ │ ├── instr_neg.s │ │ │ ├── instr_nor.s │ │ │ ├── instr_ori.s │ │ │ ├── instr_rldicl.s │ │ │ ├── instr_rldicr.s │ │ │ ├── instr_rlwimi.s │ │ │ ├── instr_rlwinm.s │ │ │ ├── instr_rlwnm.s │ │ │ ├── instr_sld.s │ │ │ ├── instr_slw.s │ │ │ ├── instr_srad.s │ │ │ ├── instr_sradi.s │ │ │ ├── instr_sraw.s │ │ │ ├── instr_srawi.s │ │ │ ├── instr_srd.s │ │ │ ├── instr_srw.s │ │ │ ├── instr_stvew.s │ │ │ ├── instr_stvl.s │ │ │ ├── instr_stvr.s │ │ │ ├── instr_subf.s │ │ │ ├── instr_subfc.s │ │ │ ├── instr_subfe.s │ │ │ ├── instr_subfic.s │ │ │ ├── instr_subfme.s │ │ │ ├── instr_subfze.s │ │ │ ├── instr_td.s │ │ │ ├── instr_tdi.s │ │ │ ├── instr_tw.s │ │ │ ├── instr_twi.s │ │ │ ├── instr_vaddfp.s │ │ │ ├── instr_vaddfp128.s │ │ │ ├── instr_vaddshs.s │ │ │ ├── instr_vadduhm.s │ │ │ ├── instr_vand.s │ │ │ ├── instr_vand128.s │ │ │ ├── instr_vandc.s │ │ │ ├── instr_vandc128.s │ │ │ ├── instr_vavgsh.s │ │ │ ├── instr_vavguh.s │ │ │ ├── instr_vcfsx.s │ │ │ ├── instr_vcmpxxfp.s │ │ │ ├── instr_vcmpxxfp128.s │ │ │ ├── instr_vctsxs.s │ │ │ ├── instr_vctuxs.s │ │ │ ├── instr_vexptefp.s │ │ │ ├── instr_vmaddfp.s │ │ │ ├── instr_vmaxfp.s │ │ │ ├── instr_vmaxfp128.s │ │ │ ├── instr_vmaxsh.s │ │ │ ├── instr_vmaxuh.s │ │ │ ├── instr_vminfp.s │ │ │ ├── instr_vminfp128.s │ │ │ ├── instr_vminsh.s │ │ │ ├── instr_vminuh.s │ │ │ ├── instr_vmrghb.s │ │ │ ├── instr_vmrghh.s │ │ │ ├── instr_vmrghw.s │ │ │ ├── instr_vmrglb.s │ │ │ ├── instr_vmrglh.s │ │ │ ├── instr_vmrglw.s │ │ │ ├── instr_vmsum3fp128.s │ │ │ ├── instr_vmsum4fp128.s │ │ │ ├── instr_vor.s │ │ │ ├── instr_vor128.s │ │ │ ├── instr_vperm.s │ │ │ ├── instr_vpermwi128.s │ │ │ ├── instr_vpkd3d128.s │ │ │ ├── instr_vpkpx.s │ │ │ ├── instr_vpkshss.s │ │ │ ├── instr_vpkshss128.s │ │ │ ├── instr_vpkshus.s │ │ │ ├── instr_vpkshus128.s │ │ │ ├── instr_vpkswss.s │ │ │ ├── instr_vpkswss128.s │ │ │ ├── instr_vpkswus.s │ │ │ ├── instr_vpkswus128.s │ │ │ ├── instr_vpkuhum.s │ │ │ ├── instr_vpkuhum128.s │ │ │ ├── instr_vpkuhus.s │ │ │ ├── instr_vpkuhus128.s │ │ │ ├── instr_vpkuwum.s │ │ │ ├── instr_vpkuwum128.s │ │ │ ├── instr_vpkuwus.s │ │ │ ├── instr_vpkuwus128.s │ │ │ ├── instr_vrfin.s │ │ │ ├── instr_vrlh.s │ │ │ ├── instr_vrlimi128.s │ │ │ ├── instr_vsel.s │ │ │ ├── instr_vsl.s │ │ │ ├── instr_vslb.s │ │ │ ├── instr_vsldoi.s │ │ │ ├── instr_vslh.s │ │ │ ├── instr_vslo.s │ │ │ ├── instr_vslw.s │ │ │ ├── instr_vspltb.s │ │ │ ├── instr_vsplth.s │ │ │ ├── instr_vspltisb.s │ │ │ ├── instr_vspltish.s │ │ │ ├── instr_vspltisw.s │ │ │ ├── instr_vspltw.s │ │ │ ├── instr_vsr.s │ │ │ ├── instr_vsrah.s │ │ │ ├── instr_vsrh.s │ │ │ ├── instr_vsro.s │ │ │ ├── instr_vsubfp.s │ │ │ ├── instr_vsubfp128.s │ │ │ ├── instr_vsubshs.s │ │ │ ├── instr_vsubuhm.s │ │ │ ├── instr_vupkd3d128.s │ │ │ ├── instr_vupkhsb.s │ │ │ ├── instr_vupkhsb128.s │ │ │ ├── instr_vupkhsh.s │ │ │ ├── instr_vupklsb.s │ │ │ ├── instr_vupklsb128.s │ │ │ ├── instr_vupklsh.s │ │ │ ├── instr_vxor.s │ │ │ ├── instr_vxor128.s │ │ │ ├── ppc_testing_main.cc │ │ │ ├── ppc_testing_native_main.cc │ │ │ ├── ppc_testing_native_thunks.s │ │ │ ├── premake5.lua │ │ │ ├── seq_branch_carry.s │ │ │ └── seq_jumptable_constants.s │ ├── premake5.lua │ ├── processor.cc │ ├── processor.h │ ├── raw_module.cc │ ├── raw_module.h │ ├── stack_walker.h │ ├── stack_walker_posix.cc │ ├── stack_walker_win.cc │ ├── symbol.h │ ├── test_module.cc │ ├── test_module.h │ ├── testing │ │ ├── add_test.cc │ │ ├── byte_swap_test.cc │ │ ├── extract_test.cc │ │ ├── insert_test.cc │ │ ├── load_vector_shl_shr_test.cc │ │ ├── pack_test.cc │ │ ├── permute_test.cc │ │ ├── premake5.lua │ │ ├── sandbox_main.cc │ │ ├── sha_test.cc │ │ ├── shl_test.cc │ │ ├── shr_test.cc │ │ ├── swizzle_test.cc │ │ ├── unpack_test.cc │ │ ├── util.h │ │ ├── vector_add_test.cc │ │ ├── vector_max_test.cc │ │ ├── vector_min_test.cc │ │ ├── vector_rotate_left_test.cc │ │ ├── vector_sha_test.cc │ │ ├── vector_shl_test.cc │ │ └── vector_shr_test.cc │ ├── thread.cc │ ├── thread.h │ ├── thread_debug_info.h │ ├── thread_state.cc │ ├── thread_state.h │ ├── xex_module.cc │ └── xex_module.h │ ├── debug │ └── ui │ │ ├── debug_window.cc │ │ ├── debug_window.h │ │ └── premake5.lua │ ├── emulator.cc │ ├── emulator.h │ ├── gpu │ ├── command_processor.cc │ ├── command_processor.h │ ├── d3d12 │ │ ├── d3d12_command_processor.cc │ │ ├── d3d12_command_processor.h │ │ ├── d3d12_graphics_system.cc │ │ ├── d3d12_graphics_system.h │ │ ├── d3d12_nvapi.hpp │ │ ├── d3d12_primitive_processor.cc │ │ ├── d3d12_primitive_processor.h │ │ ├── d3d12_render_target_cache.cc │ │ ├── d3d12_render_target_cache.h │ │ ├── d3d12_shader.cc │ │ ├── d3d12_shader.h │ │ ├── d3d12_shared_memory.cc │ │ ├── d3d12_shared_memory.h │ │ ├── d3d12_texture_cache.cc │ │ ├── d3d12_texture_cache.h │ │ ├── d3d12_trace_dump_main.cc │ │ ├── d3d12_trace_viewer_main.cc │ │ ├── deferred_command_list.cc │ │ ├── deferred_command_list.h │ │ ├── pipeline_cache.cc │ │ ├── pipeline_cache.h │ │ └── premake5.lua │ ├── draw_extent_estimator.cc │ ├── draw_extent_estimator.h │ ├── draw_util.cc │ ├── draw_util.h │ ├── dxbc.h │ ├── dxbc_shader.cc │ ├── dxbc_shader.h │ ├── dxbc_shader_translator.cc │ ├── dxbc_shader_translator.h │ ├── dxbc_shader_translator_alu.cc │ ├── dxbc_shader_translator_fetch.cc │ ├── dxbc_shader_translator_memexport.cc │ ├── dxbc_shader_translator_om.cc │ ├── gpu_flags.cc │ ├── gpu_flags.h │ ├── graphics_system.cc │ ├── graphics_system.h │ ├── null │ │ ├── null_command_processor.cc │ │ ├── null_command_processor.h │ │ ├── null_graphics_system.cc │ │ ├── null_graphics_system.h │ │ └── premake5.lua │ ├── packet_disassembler.cc │ ├── packet_disassembler.h │ ├── pm4_command_processor_declare.h │ ├── pm4_command_processor_implement.h │ ├── premake5.lua │ ├── primitive_processor.cc │ ├── primitive_processor.h │ ├── register_file.cc │ ├── register_file.h │ ├── register_table.inc │ ├── registers.cc │ ├── registers.h │ ├── render_target_cache.cc │ ├── render_target_cache.h │ ├── sampler_info.cc │ ├── sampler_info.h │ ├── shader.cc │ ├── shader.h │ ├── shader_compiler_main.cc │ ├── shader_interpreter.cc │ ├── shader_interpreter.h │ ├── shader_translator.cc │ ├── shader_translator.h │ ├── shader_translator_disasm.cc │ ├── shaders │ │ ├── adaptive_quad.hs.hlsl │ │ ├── adaptive_triangle.hs.hlsl │ │ ├── apply_gamma_pwl.cs.xesl │ │ ├── apply_gamma_pwl.ps.xesl │ │ ├── apply_gamma_pwl.xesli │ │ ├── apply_gamma_pwl_fxaa_luma.cs.xesl │ │ ├── apply_gamma_pwl_fxaa_luma.ps.xesl │ │ ├── apply_gamma_table.cs.xesl │ │ ├── apply_gamma_table.ps.xesl │ │ ├── apply_gamma_table.xesli │ │ ├── apply_gamma_table_fxaa_luma.cs.xesl │ │ ├── apply_gamma_table_fxaa_luma.ps.xesl │ │ ├── bytecode │ │ │ ├── .clang-format │ │ │ ├── d3d12_5_1 │ │ │ │ ├── adaptive_quad_hs.h │ │ │ │ ├── adaptive_triangle_hs.h │ │ │ │ ├── apply_gamma_pwl_cs.h │ │ │ │ ├── apply_gamma_pwl_fxaa_luma_cs.h │ │ │ │ ├── apply_gamma_pwl_fxaa_luma_ps.h │ │ │ │ ├── apply_gamma_pwl_ps.h │ │ │ │ ├── apply_gamma_table_cs.h │ │ │ │ ├── apply_gamma_table_fxaa_luma_cs.h │ │ │ │ ├── apply_gamma_table_fxaa_luma_ps.h │ │ │ │ ├── apply_gamma_table_ps.h │ │ │ │ ├── clear_uint2_ps.h │ │ │ │ ├── continuous_quad_1cp_hs.h │ │ │ │ ├── continuous_quad_4cp_hs.h │ │ │ │ ├── continuous_triangle_1cp_hs.h │ │ │ │ ├── continuous_triangle_3cp_hs.h │ │ │ │ ├── discrete_quad_1cp_hs.h │ │ │ │ ├── discrete_quad_4cp_hs.h │ │ │ │ ├── discrete_triangle_1cp_hs.h │ │ │ │ ├── discrete_triangle_3cp_hs.h │ │ │ │ ├── float24_round_ps.h │ │ │ │ ├── float24_truncate_ps.h │ │ │ │ ├── fullscreen_cw_vs.h │ │ │ │ ├── fxaa_cs.h │ │ │ │ ├── fxaa_extreme_cs.h │ │ │ │ ├── host_depth_store_1xmsaa_cs.h │ │ │ │ ├── host_depth_store_2xmsaa_cs.h │ │ │ │ ├── host_depth_store_4xmsaa_cs.h │ │ │ │ ├── passthrough_position_xy_vs.h │ │ │ │ ├── resolve_clear_32bpp_cs.h │ │ │ │ ├── resolve_clear_32bpp_scaled_cs.h │ │ │ │ ├── resolve_clear_64bpp_cs.h │ │ │ │ ├── resolve_clear_64bpp_scaled_cs.h │ │ │ │ ├── resolve_fast_32bpp_1x2xmsaa_cs.h │ │ │ │ ├── resolve_fast_32bpp_1x2xmsaa_scaled_cs.h │ │ │ │ ├── resolve_fast_32bpp_4xmsaa_cs.h │ │ │ │ ├── resolve_fast_32bpp_4xmsaa_scaled_cs.h │ │ │ │ ├── resolve_fast_64bpp_1x2xmsaa_cs.h │ │ │ │ ├── resolve_fast_64bpp_1x2xmsaa_scaled_cs.h │ │ │ │ ├── resolve_fast_64bpp_4xmsaa_cs.h │ │ │ │ ├── resolve_fast_64bpp_4xmsaa_scaled_cs.h │ │ │ │ ├── resolve_full_128bpp_cs.h │ │ │ │ ├── resolve_full_128bpp_scaled_cs.h │ │ │ │ ├── resolve_full_16bpp_cs.h │ │ │ │ ├── resolve_full_16bpp_scaled_cs.h │ │ │ │ ├── resolve_full_32bpp_cs.h │ │ │ │ ├── resolve_full_32bpp_scaled_cs.h │ │ │ │ ├── resolve_full_64bpp_cs.h │ │ │ │ ├── resolve_full_64bpp_scaled_cs.h │ │ │ │ ├── resolve_full_8bpp_cs.h │ │ │ │ ├── resolve_full_8bpp_scaled_cs.h │ │ │ │ ├── tessellation_adaptive_vs.h │ │ │ │ ├── tessellation_indexed_vs.h │ │ │ │ ├── texture_load_128bpb_cs.h │ │ │ │ ├── texture_load_128bpb_scaled_cs.h │ │ │ │ ├── texture_load_16bpb_cs.h │ │ │ │ ├── texture_load_16bpb_scaled_cs.h │ │ │ │ ├── texture_load_32bpb_cs.h │ │ │ │ ├── texture_load_32bpb_scaled_cs.h │ │ │ │ ├── texture_load_64bpb_cs.h │ │ │ │ ├── texture_load_64bpb_scaled_cs.h │ │ │ │ ├── texture_load_8bpb_cs.h │ │ │ │ ├── texture_load_8bpb_scaled_cs.h │ │ │ │ ├── texture_load_bgrg8_rgb8_cs.h │ │ │ │ ├── texture_load_bgrg8_rgbg8_cs.h │ │ │ │ ├── texture_load_ctx1_cs.h │ │ │ │ ├── texture_load_depth_float_cs.h │ │ │ │ ├── texture_load_depth_float_scaled_cs.h │ │ │ │ ├── texture_load_depth_unorm_cs.h │ │ │ │ ├── texture_load_depth_unorm_scaled_cs.h │ │ │ │ ├── texture_load_dxn_rg8_cs.h │ │ │ │ ├── texture_load_dxt1_rgba8_cs.h │ │ │ │ ├── texture_load_dxt3_rgba8_cs.h │ │ │ │ ├── texture_load_dxt3a_cs.h │ │ │ │ ├── texture_load_dxt3aas1111_argb4_cs.h │ │ │ │ ├── texture_load_dxt3aas1111_bgra4_cs.h │ │ │ │ ├── texture_load_dxt5_rgba8_cs.h │ │ │ │ ├── texture_load_dxt5a_r8_cs.h │ │ │ │ ├── texture_load_gbgr8_grgb8_cs.h │ │ │ │ ├── texture_load_gbgr8_rgb8_cs.h │ │ │ │ ├── texture_load_r10g11b11_rgba16_cs.h │ │ │ │ ├── texture_load_r10g11b11_rgba16_scaled_cs.h │ │ │ │ ├── texture_load_r10g11b11_rgba16_snorm_cs.h │ │ │ │ ├── texture_load_r10g11b11_rgba16_snorm_scaled_cs.h │ │ │ │ ├── texture_load_r11g11b10_rgba16_cs.h │ │ │ │ ├── texture_load_r11g11b10_rgba16_scaled_cs.h │ │ │ │ ├── texture_load_r11g11b10_rgba16_snorm_cs.h │ │ │ │ ├── texture_load_r11g11b10_rgba16_snorm_scaled_cs.h │ │ │ │ ├── texture_load_r16_snorm_float_cs.h │ │ │ │ ├── texture_load_r16_snorm_float_scaled_cs.h │ │ │ │ ├── texture_load_r16_unorm_float_cs.h │ │ │ │ ├── texture_load_r16_unorm_float_scaled_cs.h │ │ │ │ ├── texture_load_r4g4b4a4_a4r4g4b4_cs.h │ │ │ │ ├── texture_load_r4g4b4a4_a4r4g4b4_scaled_cs.h │ │ │ │ ├── texture_load_r4g4b4a4_b4g4r4a4_cs.h │ │ │ │ ├── texture_load_r4g4b4a4_b4g4r4a4_scaled_cs.h │ │ │ │ ├── texture_load_r5g5b5a1_b5g5r5a1_cs.h │ │ │ │ ├── texture_load_r5g5b5a1_b5g5r5a1_scaled_cs.h │ │ │ │ ├── texture_load_r5g5b6_b5g6r5_swizzle_rbga_cs.h │ │ │ │ ├── texture_load_r5g5b6_b5g6r5_swizzle_rbga_scaled_cs.h │ │ │ │ ├── texture_load_r5g6b5_b5g6r5_cs.h │ │ │ │ ├── texture_load_r5g6b5_b5g6r5_scaled_cs.h │ │ │ │ ├── texture_load_rg16_snorm_float_cs.h │ │ │ │ ├── texture_load_rg16_snorm_float_scaled_cs.h │ │ │ │ ├── texture_load_rg16_unorm_float_cs.h │ │ │ │ ├── texture_load_rg16_unorm_float_scaled_cs.h │ │ │ │ ├── texture_load_rgba16_snorm_float_cs.h │ │ │ │ ├── texture_load_rgba16_snorm_float_scaled_cs.h │ │ │ │ ├── texture_load_rgba16_unorm_float_cs.h │ │ │ │ └── texture_load_rgba16_unorm_float_scaled_cs.h │ │ │ └── vulkan_spirv │ │ │ │ ├── apply_gamma_pwl_cs.h │ │ │ │ ├── apply_gamma_pwl_fxaa_luma_cs.h │ │ │ │ ├── apply_gamma_pwl_fxaa_luma_ps.h │ │ │ │ ├── apply_gamma_pwl_ps.h │ │ │ │ ├── apply_gamma_table_cs.h │ │ │ │ ├── apply_gamma_table_fxaa_luma_cs.h │ │ │ │ ├── apply_gamma_table_fxaa_luma_ps.h │ │ │ │ ├── apply_gamma_table_ps.h │ │ │ │ ├── fullscreen_cw_vs.h │ │ │ │ ├── host_depth_store_1xmsaa_cs.h │ │ │ │ ├── host_depth_store_2xmsaa_cs.h │ │ │ │ ├── host_depth_store_4xmsaa_cs.h │ │ │ │ ├── passthrough_position_xy_vs.h │ │ │ │ ├── resolve_clear_32bpp_cs.h │ │ │ │ ├── resolve_clear_32bpp_scaled_cs.h │ │ │ │ ├── resolve_clear_64bpp_cs.h │ │ │ │ ├── resolve_clear_64bpp_scaled_cs.h │ │ │ │ ├── resolve_fast_32bpp_1x2xmsaa_cs.h │ │ │ │ ├── resolve_fast_32bpp_1x2xmsaa_scaled_cs.h │ │ │ │ ├── resolve_fast_32bpp_4xmsaa_cs.h │ │ │ │ ├── resolve_fast_32bpp_4xmsaa_scaled_cs.h │ │ │ │ ├── resolve_fast_64bpp_1x2xmsaa_cs.h │ │ │ │ ├── resolve_fast_64bpp_1x2xmsaa_scaled_cs.h │ │ │ │ ├── resolve_fast_64bpp_4xmsaa_cs.h │ │ │ │ ├── resolve_fast_64bpp_4xmsaa_scaled_cs.h │ │ │ │ ├── resolve_full_128bpp_cs.h │ │ │ │ ├── resolve_full_128bpp_scaled_cs.h │ │ │ │ ├── resolve_full_16bpp_cs.h │ │ │ │ ├── resolve_full_16bpp_scaled_cs.h │ │ │ │ ├── resolve_full_32bpp_cs.h │ │ │ │ ├── resolve_full_32bpp_scaled_cs.h │ │ │ │ ├── resolve_full_64bpp_cs.h │ │ │ │ ├── resolve_full_64bpp_scaled_cs.h │ │ │ │ ├── resolve_full_8bpp_cs.h │ │ │ │ ├── resolve_full_8bpp_scaled_cs.h │ │ │ │ ├── texture_load_128bpb_cs.h │ │ │ │ ├── texture_load_128bpb_scaled_cs.h │ │ │ │ ├── texture_load_16bpb_cs.h │ │ │ │ ├── texture_load_16bpb_scaled_cs.h │ │ │ │ ├── texture_load_32bpb_cs.h │ │ │ │ ├── texture_load_32bpb_scaled_cs.h │ │ │ │ ├── texture_load_64bpb_cs.h │ │ │ │ ├── texture_load_64bpb_scaled_cs.h │ │ │ │ ├── texture_load_8bpb_cs.h │ │ │ │ ├── texture_load_8bpb_scaled_cs.h │ │ │ │ ├── texture_load_bgrg8_rgb8_cs.h │ │ │ │ ├── texture_load_bgrg8_rgbg8_cs.h │ │ │ │ ├── texture_load_ctx1_cs.h │ │ │ │ ├── texture_load_depth_float_cs.h │ │ │ │ ├── texture_load_depth_float_scaled_cs.h │ │ │ │ ├── texture_load_depth_unorm_cs.h │ │ │ │ ├── texture_load_depth_unorm_scaled_cs.h │ │ │ │ ├── texture_load_dxn_rg8_cs.h │ │ │ │ ├── texture_load_dxt1_rgba8_cs.h │ │ │ │ ├── texture_load_dxt3_rgba8_cs.h │ │ │ │ ├── texture_load_dxt3a_cs.h │ │ │ │ ├── texture_load_dxt3aas1111_argb4_cs.h │ │ │ │ ├── texture_load_dxt3aas1111_bgra4_cs.h │ │ │ │ ├── texture_load_dxt5_rgba8_cs.h │ │ │ │ ├── texture_load_dxt5a_r8_cs.h │ │ │ │ ├── texture_load_gbgr8_grgb8_cs.h │ │ │ │ ├── texture_load_gbgr8_rgb8_cs.h │ │ │ │ ├── texture_load_r10g11b11_rgba16_cs.h │ │ │ │ ├── texture_load_r10g11b11_rgba16_scaled_cs.h │ │ │ │ ├── texture_load_r10g11b11_rgba16_snorm_cs.h │ │ │ │ ├── texture_load_r10g11b11_rgba16_snorm_scaled_cs.h │ │ │ │ ├── texture_load_r11g11b10_rgba16_cs.h │ │ │ │ ├── texture_load_r11g11b10_rgba16_scaled_cs.h │ │ │ │ ├── texture_load_r11g11b10_rgba16_snorm_cs.h │ │ │ │ ├── texture_load_r11g11b10_rgba16_snorm_scaled_cs.h │ │ │ │ ├── texture_load_r16_snorm_float_cs.h │ │ │ │ ├── texture_load_r16_snorm_float_scaled_cs.h │ │ │ │ ├── texture_load_r16_unorm_float_cs.h │ │ │ │ ├── texture_load_r16_unorm_float_scaled_cs.h │ │ │ │ ├── texture_load_r4g4b4a4_a4r4g4b4_cs.h │ │ │ │ ├── texture_load_r4g4b4a4_a4r4g4b4_scaled_cs.h │ │ │ │ ├── texture_load_r4g4b4a4_b4g4r4a4_cs.h │ │ │ │ ├── texture_load_r4g4b4a4_b4g4r4a4_scaled_cs.h │ │ │ │ ├── texture_load_r5g5b5a1_b5g5r5a1_cs.h │ │ │ │ ├── texture_load_r5g5b5a1_b5g5r5a1_scaled_cs.h │ │ │ │ ├── texture_load_r5g5b6_b5g6r5_swizzle_rbga_cs.h │ │ │ │ ├── texture_load_r5g5b6_b5g6r5_swizzle_rbga_scaled_cs.h │ │ │ │ ├── texture_load_r5g6b5_b5g6r5_cs.h │ │ │ │ ├── texture_load_r5g6b5_b5g6r5_scaled_cs.h │ │ │ │ ├── texture_load_rg16_snorm_float_cs.h │ │ │ │ ├── texture_load_rg16_snorm_float_scaled_cs.h │ │ │ │ ├── texture_load_rg16_unorm_float_cs.h │ │ │ │ ├── texture_load_rg16_unorm_float_scaled_cs.h │ │ │ │ ├── texture_load_rgba16_snorm_float_cs.h │ │ │ │ ├── texture_load_rgba16_snorm_float_scaled_cs.h │ │ │ │ ├── texture_load_rgba16_unorm_float_cs.h │ │ │ │ └── texture_load_rgba16_unorm_float_scaled_cs.h │ │ ├── clear_uint2.ps.hlsl │ │ ├── continuous_quad.hlsli │ │ ├── continuous_quad_1cp.hs.hlsl │ │ ├── continuous_quad_4cp.hs.hlsl │ │ ├── continuous_triangle.hlsli │ │ ├── continuous_triangle_1cp.hs.hlsl │ │ ├── continuous_triangle_3cp.hs.hlsl │ │ ├── discrete_quad.hlsli │ │ ├── discrete_quad_1cp.hs.hlsl │ │ ├── discrete_quad_4cp.hs.hlsl │ │ ├── discrete_triangle.hlsli │ │ ├── discrete_triangle_1cp.hs.hlsl │ │ ├── discrete_triangle_3cp.hs.hlsl │ │ ├── edram.xesli │ │ ├── endian.xesli │ │ ├── float24_round.ps.hlsl │ │ ├── float24_truncate.ps.hlsl │ │ ├── fullscreen_cw.vs.xesl │ │ ├── fxaa.cs.hlsl │ │ ├── fxaa.hlsli │ │ ├── fxaa_extreme.cs.hlsl │ │ ├── host_depth_store.xesli │ │ ├── host_depth_store_1xmsaa.cs.xesl │ │ ├── host_depth_store_2xmsaa.cs.xesl │ │ ├── host_depth_store_4xmsaa.cs.xesl │ │ ├── passthrough_position_xy.vs.xesl │ │ ├── pixel_formats.xesli │ │ ├── resolve.xesli │ │ ├── resolve_clear_32bpp.cs.xesl │ │ ├── resolve_clear_32bpp.xesli │ │ ├── resolve_clear_32bpp_scaled.cs.xesl │ │ ├── resolve_clear_64bpp.cs.xesl │ │ ├── resolve_clear_64bpp.xesli │ │ ├── resolve_clear_64bpp_scaled.cs.xesl │ │ ├── resolve_fast_32bpp_1x2xmsaa.cs.xesl │ │ ├── resolve_fast_32bpp_1x2xmsaa.xesli │ │ ├── resolve_fast_32bpp_1x2xmsaa_scaled.cs.xesl │ │ ├── resolve_fast_32bpp_4xmsaa.cs.xesl │ │ ├── resolve_fast_32bpp_4xmsaa.xesli │ │ ├── resolve_fast_32bpp_4xmsaa_scaled.cs.xesl │ │ ├── resolve_fast_64bpp_1x2xmsaa.cs.xesl │ │ ├── resolve_fast_64bpp_1x2xmsaa.xesli │ │ ├── resolve_fast_64bpp_1x2xmsaa_scaled.cs.xesl │ │ ├── resolve_fast_64bpp_4xmsaa.cs.xesl │ │ ├── resolve_fast_64bpp_4xmsaa.xesli │ │ ├── resolve_fast_64bpp_4xmsaa_scaled.cs.xesl │ │ ├── resolve_full_128bpp.cs.xesl │ │ ├── resolve_full_128bpp.xesli │ │ ├── resolve_full_128bpp_scaled.cs.xesl │ │ ├── resolve_full_16bpp.cs.xesl │ │ ├── resolve_full_16bpp.xesli │ │ ├── resolve_full_16bpp_scaled.cs.xesl │ │ ├── resolve_full_32bpp.cs.xesl │ │ ├── resolve_full_32bpp.xesli │ │ ├── resolve_full_32bpp_scaled.cs.xesl │ │ ├── resolve_full_64bpp.cs.xesl │ │ ├── resolve_full_64bpp.xesli │ │ ├── resolve_full_64bpp_scaled.cs.xesl │ │ ├── resolve_full_8bpp.cs.xesl │ │ ├── resolve_full_8bpp.xesli │ │ ├── resolve_full_8bpp_scaled.cs.xesl │ │ ├── tessellation_adaptive.vs.hlsl │ │ ├── tessellation_indexed.vs.hlsl │ │ ├── texture_address.xesli │ │ ├── texture_load.xesli │ │ ├── texture_load_128bpb.cs.xesl │ │ ├── texture_load_128bpb.xesli │ │ ├── texture_load_128bpb_scaled.cs.xesl │ │ ├── texture_load_16bpb.cs.xesl │ │ ├── texture_load_16bpb.xesli │ │ ├── texture_load_16bpb_scaled.cs.xesl │ │ ├── texture_load_32bpb.cs.xesl │ │ ├── texture_load_32bpb.xesli │ │ ├── texture_load_32bpb_64bpb.xesli │ │ ├── texture_load_32bpb_scaled.cs.xesl │ │ ├── texture_load_64bpb.cs.xesl │ │ ├── texture_load_64bpb.xesli │ │ ├── texture_load_64bpb_scaled.cs.xesl │ │ ├── texture_load_8bpb.cs.xesl │ │ ├── texture_load_8bpb.xesli │ │ ├── texture_load_8bpb_scaled.cs.xesl │ │ ├── texture_load_bgrg8_rgb8.cs.xesl │ │ ├── texture_load_bgrg8_rgbg8.cs.xesl │ │ ├── texture_load_ctx1.cs.xesl │ │ ├── texture_load_depth_float.cs.xesl │ │ ├── texture_load_depth_float_scaled.cs.xesl │ │ ├── texture_load_depth_unorm.cs.xesl │ │ ├── texture_load_depth_unorm_scaled.cs.xesl │ │ ├── texture_load_dxn_rg8.cs.xesl │ │ ├── texture_load_dxt1_rgba8.cs.xesl │ │ ├── texture_load_dxt3_rgba8.cs.xesl │ │ ├── texture_load_dxt3a.cs.xesl │ │ ├── texture_load_dxt3aas1111.xesli │ │ ├── texture_load_dxt3aas1111_argb4.cs.xesl │ │ ├── texture_load_dxt3aas1111_bgra4.cs.xesl │ │ ├── texture_load_dxt5_rgba8.cs.xesl │ │ ├── texture_load_dxt5a_r8.cs.xesl │ │ ├── texture_load_gbgr8_grgb8.cs.xesl │ │ ├── texture_load_gbgr8_rgb8.cs.xesl │ │ ├── texture_load_r10g11b11_rgba16.cs.xesl │ │ ├── texture_load_r10g11b11_rgba16_scaled.cs.xesl │ │ ├── texture_load_r10g11b11_rgba16_snorm.cs.xesl │ │ ├── texture_load_r10g11b11_rgba16_snorm_scaled.cs.xesl │ │ ├── texture_load_r11g11b10_rgba16.cs.xesl │ │ ├── texture_load_r11g11b10_rgba16_scaled.cs.xesl │ │ ├── texture_load_r11g11b10_rgba16_snorm.cs.xesl │ │ ├── texture_load_r11g11b10_rgba16_snorm_scaled.cs.xesl │ │ ├── texture_load_r16_snorm_float.cs.xesl │ │ ├── texture_load_r16_snorm_float_scaled.cs.xesl │ │ ├── texture_load_r16_unorm_float.cs.xesl │ │ ├── texture_load_r16_unorm_float_scaled.cs.xesl │ │ ├── texture_load_r4g4b4a4_a4r4g4b4.cs.xesl │ │ ├── texture_load_r4g4b4a4_a4r4g4b4_scaled.cs.xesl │ │ ├── texture_load_r4g4b4a4_b4g4r4a4.cs.xesl │ │ ├── texture_load_r4g4b4a4_b4g4r4a4_scaled.cs.xesl │ │ ├── texture_load_r5g5b5a1_b5g5r5a1.cs.xesl │ │ ├── texture_load_r5g5b5a1_b5g5r5a1_scaled.cs.xesl │ │ ├── texture_load_r5g5b6_b5g6r5_swizzle_rbga.cs.xesl │ │ ├── texture_load_r5g5b6_b5g6r5_swizzle_rbga_scaled.cs.xesl │ │ ├── texture_load_r5g6b5_b5g6r5.cs.xesl │ │ ├── texture_load_r5g6b5_b5g6r5_scaled.cs.xesl │ │ ├── texture_load_rg16_snorm_float.cs.xesl │ │ ├── texture_load_rg16_snorm_float_scaled.cs.xesl │ │ ├── texture_load_rg16_unorm_float.cs.xesl │ │ ├── texture_load_rg16_unorm_float_scaled.cs.xesl │ │ ├── texture_load_rgba16_snorm_float.cs.xesl │ │ ├── texture_load_rgba16_snorm_float_scaled.cs.xesl │ │ ├── texture_load_rgba16_unorm_float.cs.xesl │ │ ├── texture_load_rgba16_unorm_float_scaled.cs.xesl │ │ └── xenos_draw.hlsli │ ├── shared_memory.cc │ ├── shared_memory.h │ ├── spirv_builder.cc │ ├── spirv_builder.h │ ├── spirv_shader.cc │ ├── spirv_shader.h │ ├── spirv_shader_translator.cc │ ├── spirv_shader_translator.h │ ├── spirv_shader_translator_alu.cc │ ├── spirv_shader_translator_fetch.cc │ ├── spirv_shader_translator_memexport.cc │ ├── spirv_shader_translator_rb.cc │ ├── texture_cache.cc │ ├── texture_cache.h │ ├── texture_conversion.cc │ ├── texture_conversion.h │ ├── texture_dump.cc │ ├── texture_extent.cc │ ├── texture_info.cc │ ├── texture_info.h │ ├── texture_info_formats.cc │ ├── texture_info_formats.inl │ ├── texture_util.cc │ ├── texture_util.h │ ├── trace_dump.cc │ ├── trace_dump.h │ ├── trace_player.cc │ ├── trace_player.h │ ├── trace_protocol.h │ ├── trace_reader.cc │ ├── trace_reader.h │ ├── trace_viewer.cc │ ├── trace_viewer.h │ ├── trace_writer.cc │ ├── trace_writer.h │ ├── ucode.cc │ ├── ucode.h │ ├── vulkan │ │ ├── deferred_command_buffer.cc │ │ ├── deferred_command_buffer.h │ │ ├── premake5.lua │ │ ├── vulkan_command_processor.cc │ │ ├── vulkan_command_processor.h │ │ ├── vulkan_graphics_system.cc │ │ ├── vulkan_graphics_system.h │ │ ├── vulkan_pipeline_cache.cc │ │ ├── vulkan_pipeline_cache.h │ │ ├── vulkan_primitive_processor.cc │ │ ├── vulkan_primitive_processor.h │ │ ├── vulkan_render_target_cache.cc │ │ ├── vulkan_render_target_cache.h │ │ ├── vulkan_shader.cc │ │ ├── vulkan_shader.h │ │ ├── vulkan_shared_memory.cc │ │ ├── vulkan_shared_memory.h │ │ ├── vulkan_texture_cache.cc │ │ ├── vulkan_texture_cache.h │ │ ├── vulkan_trace_dump_main.cc │ │ └── vulkan_trace_viewer_main.cc │ ├── xenos.cc │ └── xenos.h │ ├── guest_pointers.h │ ├── helper │ └── sdl │ │ ├── premake5.lua │ │ ├── sdl_helper.cc │ │ └── sdl_helper.h │ ├── hid │ ├── hid_demo.cc │ ├── hid_flags.cc │ ├── hid_flags.h │ ├── input.h │ ├── input_driver.h │ ├── input_system.cc │ ├── input_system.h │ ├── nop │ │ ├── nop_hid.cc │ │ ├── nop_hid.h │ │ ├── nop_input_driver.cc │ │ ├── nop_input_driver.h │ │ └── premake5.lua │ ├── premake5.lua │ ├── sdl │ │ ├── premake5.lua │ │ ├── sdl_hid.cc │ │ ├── sdl_hid.h │ │ ├── sdl_input_driver.cc │ │ └── sdl_input_driver.h │ ├── skylander │ │ ├── premake5.lua │ │ ├── skylander_emulated.cc │ │ ├── skylander_emulated.h │ │ ├── skylander_hardware.cc │ │ ├── skylander_hardware.h │ │ ├── skylander_portal.cc │ │ └── skylander_portal.h │ ├── winkey │ │ ├── premake5.lua │ │ ├── winkey_binding_table.inc │ │ ├── winkey_hid.cc │ │ ├── winkey_hid.h │ │ ├── winkey_input_driver.cc │ │ └── winkey_input_driver.h │ └── xinput │ │ ├── premake5.lua │ │ ├── xinput_hid.cc │ │ ├── xinput_hid.h │ │ ├── xinput_input_driver.cc │ │ └── xinput_input_driver.h │ ├── kernel │ ├── debug_visualizers.natvis │ ├── info │ │ ├── file.h │ │ └── volume.h │ ├── kernel_flags.cc │ ├── kernel_flags.h │ ├── kernel_module.cc │ ├── kernel_module.h │ ├── kernel_state.cc │ ├── kernel_state.h │ ├── premake5.lua │ ├── smc.cc │ ├── smc.h │ ├── title_id_utils.h │ ├── user_module.cc │ ├── user_module.h │ ├── util │ │ ├── crypto_utils.cc │ │ ├── crypto_utils.h │ │ ├── export_table_post.inc │ │ ├── export_table_pre.inc │ │ ├── game_info_database.cc │ │ ├── game_info_database.h │ │ ├── guest_object_table.cc │ │ ├── guest_object_table.h │ │ ├── kernel_fwd.h │ │ ├── native_list.cc │ │ ├── native_list.h │ │ ├── object_table.cc │ │ ├── object_table.h │ │ ├── ordinal_table_post.inc │ │ ├── ordinal_table_pre.inc │ │ ├── presence_string_builder.cc │ │ ├── presence_string_builder.h │ │ ├── shim_utils.cc │ │ ├── shim_utils.h │ │ ├── xex2_info.h │ │ ├── xlast.cc │ │ └── xlast.h │ ├── xam │ │ ├── achievement_backends │ │ │ ├── gpd_achievement_backend.cc │ │ │ └── gpd_achievement_backend.h │ │ ├── achievement_manager.cc │ │ ├── achievement_manager.h │ │ ├── app_manager.cc │ │ ├── app_manager.h │ │ ├── apps │ │ │ ├── messenger_app.cc │ │ │ ├── messenger_app.h │ │ │ ├── xam_app.cc │ │ │ ├── xam_app.h │ │ │ ├── xgi_app.cc │ │ │ ├── xgi_app.h │ │ │ ├── xlivebase_app.cc │ │ │ ├── xlivebase_app.h │ │ │ ├── xmp_app.cc │ │ │ └── xmp_app.h │ │ ├── content_manager.cc │ │ ├── content_manager.h │ │ ├── profile_manager.cc │ │ ├── profile_manager.h │ │ ├── user_data.cc │ │ ├── user_data.h │ │ ├── user_profile.cc │ │ ├── user_profile.h │ │ ├── user_property.cc │ │ ├── user_property.h │ │ ├── user_settings.cc │ │ ├── user_settings.h │ │ ├── user_tracker.cc │ │ ├── user_tracker.h │ │ ├── xam_avatar.cc │ │ ├── xam_content.cc │ │ ├── xam_content_aggregate.cc │ │ ├── xam_content_device.cc │ │ ├── xam_content_device.h │ │ ├── xam_enum.cc │ │ ├── xam_info.cc │ │ ├── xam_input.cc │ │ ├── xam_locale.cc │ │ ├── xam_media.cc │ │ ├── xam_module.cc │ │ ├── xam_module.h │ │ ├── xam_module_export_groups.inc │ │ ├── xam_msg.cc │ │ ├── xam_net.cc │ │ ├── xam_notify.cc │ │ ├── xam_nui.cc │ │ ├── xam_ordinals.h │ │ ├── xam_party.cc │ │ ├── xam_private.h │ │ ├── xam_profile.cc │ │ ├── xam_state.cc │ │ ├── xam_state.h │ │ ├── xam_table.inc │ │ ├── xam_task.cc │ │ ├── xam_ui.cc │ │ ├── xam_user.cc │ │ ├── xam_video.cc │ │ ├── xam_voice.cc │ │ └── xdbf │ │ │ ├── gpd_info.cc │ │ │ ├── gpd_info.h │ │ │ ├── gpd_info_profile.cc │ │ │ ├── gpd_info_profile.h │ │ │ ├── gpd_info_title.cc │ │ │ ├── gpd_info_title.h │ │ │ ├── spa_info.cc │ │ │ ├── spa_info.h │ │ │ ├── xdbf_io.cc │ │ │ └── xdbf_io.h │ ├── xbdm │ │ ├── xbdm_misc.cc │ │ ├── xbdm_module.cc │ │ ├── xbdm_module.h │ │ ├── xbdm_module_export_groups.inc │ │ ├── xbdm_ordinals.h │ │ ├── xbdm_private.h │ │ └── xbdm_table.inc │ ├── xboxkrnl │ │ ├── cert_monitor.cc │ │ ├── cert_monitor.h │ │ ├── debug_monitor.cc │ │ ├── debug_monitor.h │ │ ├── xboxkrnl_audio.cc │ │ ├── xboxkrnl_audio_xma.cc │ │ ├── xboxkrnl_crypt.cc │ │ ├── xboxkrnl_debug.cc │ │ ├── xboxkrnl_error.cc │ │ ├── xboxkrnl_error.h │ │ ├── xboxkrnl_hal.cc │ │ ├── xboxkrnl_hid.cc │ │ ├── xboxkrnl_io.cc │ │ ├── xboxkrnl_io_info.cc │ │ ├── xboxkrnl_memory.cc │ │ ├── xboxkrnl_memory.h │ │ ├── xboxkrnl_misc.cc │ │ ├── xboxkrnl_module.cc │ │ ├── xboxkrnl_module.h │ │ ├── xboxkrnl_module_export_groups.inc │ │ ├── xboxkrnl_modules.cc │ │ ├── xboxkrnl_modules.h │ │ ├── xboxkrnl_ob.cc │ │ ├── xboxkrnl_ob.h │ │ ├── xboxkrnl_ordinals.h │ │ ├── xboxkrnl_private.h │ │ ├── xboxkrnl_rtl.cc │ │ ├── xboxkrnl_rtl.h │ │ ├── xboxkrnl_strings.cc │ │ ├── xboxkrnl_table.inc │ │ ├── xboxkrnl_threading.cc │ │ ├── xboxkrnl_threading.h │ │ ├── xboxkrnl_usbcam.cc │ │ ├── xboxkrnl_video.cc │ │ ├── xboxkrnl_video.h │ │ ├── xboxkrnl_xconfig.cc │ │ └── xboxkrnl_xconfig.h │ ├── xenumerator.cc │ ├── xenumerator.h │ ├── xevent.cc │ ├── xevent.h │ ├── xfile.cc │ ├── xfile.h │ ├── xiocompletion.cc │ ├── xiocompletion.h │ ├── xmodule.cc │ ├── xmodule.h │ ├── xmutant.cc │ ├── xmutant.h │ ├── xnotifylistener.cc │ ├── xnotifylistener.h │ ├── xobject.cc │ ├── xobject.h │ ├── xsemaphore.cc │ ├── xsemaphore.h │ ├── xsocket.cc │ ├── xsocket.h │ ├── xsymboliclink.cc │ ├── xsymboliclink.h │ ├── xthread.cc │ ├── xthread.h │ ├── xtimer.cc │ └── xtimer.h │ ├── memory.cc │ ├── memory.h │ ├── patcher │ ├── patch_db.cc │ ├── patch_db.h │ ├── patcher.cc │ ├── patcher.h │ ├── plugin_loader.cc │ ├── plugin_loader.h │ └── premake5.lua │ ├── premake5.lua │ ├── tools │ └── api-scanner │ │ ├── README.md │ │ ├── api_scanner_loader.cc │ │ ├── api_scanner_loader.h │ │ └── api_scanner_main.cc │ ├── ui │ ├── d3d12 │ │ ├── d3d12_api.h │ │ ├── d3d12_cpu_descriptor_pool.cc │ │ ├── d3d12_cpu_descriptor_pool.h │ │ ├── d3d12_descriptor_heap_pool.cc │ │ ├── d3d12_descriptor_heap_pool.h │ │ ├── d3d12_immediate_drawer.cc │ │ ├── d3d12_immediate_drawer.h │ │ ├── d3d12_presenter.cc │ │ ├── d3d12_presenter.h │ │ ├── d3d12_provider.cc │ │ ├── d3d12_provider.h │ │ ├── d3d12_submission_tracker.cc │ │ ├── d3d12_submission_tracker.h │ │ ├── d3d12_upload_buffer_pool.cc │ │ ├── d3d12_upload_buffer_pool.h │ │ ├── d3d12_util.cc │ │ ├── d3d12_util.h │ │ ├── d3d12_window_demo.cc │ │ └── premake5.lua │ ├── file_picker.h │ ├── file_picker_android.cc │ ├── file_picker_gtk.cc │ ├── file_picker_win.cc │ ├── graphics_provider.h │ ├── graphics_upload_buffer_pool.cc │ ├── graphics_upload_buffer_pool.h │ ├── graphics_util.cc │ ├── graphics_util.h │ ├── imgui_dialog.cc │ ├── imgui_dialog.h │ ├── imgui_drawer.cc │ ├── imgui_drawer.h │ ├── imgui_guest_notification.cc │ ├── imgui_guest_notification.h │ ├── imgui_host_notification.cc │ ├── imgui_host_notification.h │ ├── imgui_notification.cc │ ├── imgui_notification.h │ ├── immediate_drawer.cc │ ├── immediate_drawer.h │ ├── menu_item.cc │ ├── menu_item.h │ ├── microprofile_drawer.cc │ ├── microprofile_drawer.h │ ├── premake5.lua │ ├── presenter.cc │ ├── presenter.h │ ├── renderdoc_api.cc │ ├── renderdoc_api.h │ ├── resources.h │ ├── shaders │ │ ├── amd_language.xesli │ │ ├── bytecode │ │ │ ├── .clang-format │ │ │ ├── d3d12_5_1 │ │ │ │ ├── guest_output_bilinear_dither_ps.h │ │ │ │ ├── guest_output_bilinear_ps.h │ │ │ │ ├── guest_output_ffx_cas_resample_dither_ps.h │ │ │ │ ├── guest_output_ffx_cas_resample_ps.h │ │ │ │ ├── guest_output_ffx_cas_sharpen_dither_ps.h │ │ │ │ ├── guest_output_ffx_cas_sharpen_ps.h │ │ │ │ ├── guest_output_ffx_fsr_easu_ps.h │ │ │ │ ├── guest_output_ffx_fsr_rcas_dither_ps.h │ │ │ │ ├── guest_output_ffx_fsr_rcas_ps.h │ │ │ │ ├── guest_output_triangle_strip_rect_vs.h │ │ │ │ ├── immediate_ps.h │ │ │ │ └── immediate_vs.h │ │ │ └── vulkan_spirv │ │ │ │ ├── guest_output_bilinear_dither_ps.h │ │ │ │ ├── guest_output_bilinear_ps.h │ │ │ │ ├── guest_output_ffx_cas_resample_dither_ps.h │ │ │ │ ├── guest_output_ffx_cas_resample_ps.h │ │ │ │ ├── guest_output_ffx_cas_sharpen_dither_ps.h │ │ │ │ ├── guest_output_ffx_cas_sharpen_ps.h │ │ │ │ ├── guest_output_ffx_fsr_easu_ps.h │ │ │ │ ├── guest_output_ffx_fsr_rcas_dither_ps.h │ │ │ │ ├── guest_output_ffx_fsr_rcas_ps.h │ │ │ │ ├── guest_output_triangle_strip_rect_vs.h │ │ │ │ ├── immediate_ps.h │ │ │ │ └── immediate_vs.h │ │ ├── dither_8bpc.xesli │ │ ├── guest_output_bilinear.ps.xesl │ │ ├── guest_output_bilinear.xesli │ │ ├── guest_output_bilinear_dither.ps.xesl │ │ ├── guest_output_ffx_cas_resample.ps.xesl │ │ ├── guest_output_ffx_cas_resample.xesli │ │ ├── guest_output_ffx_cas_resample_dither.ps.xesl │ │ ├── guest_output_ffx_cas_sharpen.ps.xesl │ │ ├── guest_output_ffx_cas_sharpen.xesli │ │ ├── guest_output_ffx_cas_sharpen_dither.ps.xesl │ │ ├── guest_output_ffx_fsr_easu.ps.xesl │ │ ├── guest_output_ffx_fsr_rcas.ps.xesl │ │ ├── guest_output_ffx_fsr_rcas.xesli │ │ ├── guest_output_ffx_fsr_rcas_dither.ps.xesl │ │ ├── guest_output_triangle_strip_rect.vs.xesl │ │ ├── immediate.ps.xesl │ │ ├── immediate.vs.xesl │ │ ├── noise.xesli │ │ └── xesl.xesli │ ├── surface.h │ ├── surface_android.cc │ ├── surface_android.h │ ├── surface_gnulinux.cc │ ├── surface_gnulinux.h │ ├── surface_win.cc │ ├── surface_win.h │ ├── ui_drawer.h │ ├── ui_event.h │ ├── virtual_key.h │ ├── vulkan │ │ ├── functions │ │ │ ├── device_1_0.inc │ │ │ ├── device_khr_bind_memory2.inc │ │ │ ├── device_khr_get_memory_requirements2.inc │ │ │ ├── device_khr_maintenance4.inc │ │ │ ├── device_khr_swapchain.inc │ │ │ ├── instance_1_0.inc │ │ │ ├── instance_ext_debug_utils.inc │ │ │ ├── instance_khr_android_surface.inc │ │ │ ├── instance_khr_get_physical_device_properties2.inc │ │ │ ├── instance_khr_surface.inc │ │ │ ├── instance_khr_win32_surface.inc │ │ │ └── instance_khr_xcb_surface.inc │ │ ├── linked_type_descriptor_set_allocator.cc │ │ ├── linked_type_descriptor_set_allocator.h │ │ ├── premake5.lua │ │ ├── single_layout_descriptor_set_pool.cc │ │ ├── single_layout_descriptor_set_pool.h │ │ ├── spirv_tools_context.cc │ │ ├── spirv_tools_context.h │ │ ├── vulkan_immediate_drawer.cc │ │ ├── vulkan_immediate_drawer.h │ │ ├── vulkan_mem_alloc.cc │ │ ├── vulkan_mem_alloc.h │ │ ├── vulkan_presenter.cc │ │ ├── vulkan_presenter.h │ │ ├── vulkan_provider.cc │ │ ├── vulkan_provider.h │ │ ├── vulkan_submission_tracker.cc │ │ ├── vulkan_submission_tracker.h │ │ ├── vulkan_upload_buffer_pool.cc │ │ ├── vulkan_upload_buffer_pool.h │ │ ├── vulkan_util.cc │ │ ├── vulkan_util.h │ │ └── vulkan_window_demo.cc │ ├── window.cc │ ├── window.h │ ├── window_android.cc │ ├── window_android.h │ ├── window_demo.cc │ ├── window_demo.h │ ├── window_gtk.cc │ ├── window_gtk.h │ ├── window_listener.h │ ├── window_win.cc │ ├── window_win.h │ ├── windowed_app.cc │ ├── windowed_app.h │ ├── windowed_app_context.cc │ ├── windowed_app_context.h │ ├── windowed_app_context_android.cc │ ├── windowed_app_context_android.h │ ├── windowed_app_context_gtk.cc │ ├── windowed_app_context_gtk.h │ ├── windowed_app_context_win.cc │ ├── windowed_app_context_win.h │ ├── windowed_app_main_android.cc │ ├── windowed_app_main_posix.cc │ └── windowed_app_main_win.cc │ ├── vfs │ ├── device.cc │ ├── device.h │ ├── devices │ │ ├── disc_image_device.cc │ │ ├── disc_image_device.h │ │ ├── disc_image_entry.cc │ │ ├── disc_image_entry.h │ │ ├── disc_image_file.cc │ │ ├── disc_image_file.h │ │ ├── disc_zarchive_device.cc │ │ ├── disc_zarchive_device.h │ │ ├── disc_zarchive_entry.cc │ │ ├── disc_zarchive_entry.h │ │ ├── disc_zarchive_file.cc │ │ ├── disc_zarchive_file.h │ │ ├── host_path_device.cc │ │ ├── host_path_device.h │ │ ├── host_path_entry.cc │ │ ├── host_path_entry.h │ │ ├── host_path_file.cc │ │ ├── host_path_file.h │ │ ├── null_device.cc │ │ ├── null_device.h │ │ ├── null_entry.cc │ │ ├── null_entry.h │ │ ├── null_file.cc │ │ ├── null_file.h │ │ ├── stfs_xbox.h │ │ ├── xcontent_container_device.cc │ │ ├── xcontent_container_device.h │ │ ├── xcontent_container_entry.cc │ │ ├── xcontent_container_entry.h │ │ ├── xcontent_container_file.cc │ │ ├── xcontent_container_file.h │ │ └── xcontent_devices │ │ │ ├── stfs_container_device.cc │ │ │ ├── stfs_container_device.h │ │ │ ├── stfs_container_entry.cc │ │ │ ├── stfs_container_entry.h │ │ │ ├── stfs_container_file.cc │ │ │ ├── stfs_container_file.h │ │ │ ├── svod_container_device.cc │ │ │ ├── svod_container_device.h │ │ │ ├── svod_container_entry.cc │ │ │ ├── svod_container_entry.h │ │ │ ├── svod_container_file.cc │ │ │ └── svod_container_file.h │ ├── entry.cc │ ├── entry.h │ ├── file.h │ ├── premake5.lua │ ├── testing │ │ ├── premake5.lua │ │ └── vfs_test.cc │ ├── vfs_dump.cc │ ├── virtual_file_system.cc │ └── virtual_file_system.h │ └── xbox.h ├── third_party ├── .clang-format ├── SDL2-static.lua ├── SDL2.lua ├── aes_128.lua ├── binutils │ ├── README.md │ ├── binutils-2.24-vmx128.patch │ └── build.sh ├── capstone.lua ├── clang-format │ ├── LICENSE.TXT │ ├── clang-format-bbedit.applescript │ ├── clang-format-diff.py │ ├── clang-format-sublime.py │ ├── clang-format.el │ ├── clang-format.py │ └── git-clang-format ├── crypto │ ├── TinySHA1.hpp │ ├── des │ │ ├── LICENSE │ │ ├── README.md │ │ ├── des.cpp │ │ ├── des.h │ │ ├── des3.h │ │ ├── des_data.h │ │ ├── des_key.h │ │ ├── des_lookup.h │ │ └── descbc.h │ ├── rc4.c │ ├── rc4.h │ ├── rijndael-alg-fst.c │ ├── rijndael-alg-fst.h │ ├── sha256.cpp │ └── sha256.h ├── cxxopts.lua ├── discord-rpc.lua ├── dxbc.lua ├── dxbc │ ├── DXBCChecksum.cpp │ └── DXBCChecksum.h ├── fmt.lua ├── fxaa │ ├── FXAA3_11.h │ └── LICENSE ├── glslang-spirv.lua ├── google-styleguide │ └── cpplint │ │ ├── README │ │ └── cpplint.py ├── half │ ├── ChangeLog.txt │ ├── LICENSE.txt │ ├── README.txt │ └── include │ │ └── half.hpp ├── imgui.lua ├── libusb.lua ├── llvm │ ├── LICENSE.txt │ └── include │ │ └── llvm │ │ ├── ADT │ │ └── BitVector.h │ │ └── Support │ │ ├── Compiler.h │ │ └── MathExtras.h ├── microprofile │ ├── README.md │ ├── microprofile.h │ ├── microprofiledraw.h │ ├── microprofilehtml.h │ └── microprofileui.h ├── mspack.lua ├── mspack │ ├── COPYING.LIB │ ├── config.h │ ├── logging.cc │ ├── lzx.h │ ├── lzxd.c │ ├── mspack.h │ ├── readbits.h │ ├── readhuff.h │ ├── system.c │ └── system.h ├── pe │ └── pe_image.h ├── pugixml.lua ├── renderdoc │ └── renderdoc_app.h ├── snappy.lua ├── stb │ ├── stb_image.h │ └── stb_image_write.h ├── tomlplusplus.lua ├── xxhash.lua ├── zarchive.lua ├── zlib.lua └── zstd.lua ├── tools ├── build │ ├── bin │ │ └── premake5.exe │ ├── premake │ ├── premake5.lua │ ├── scripts │ │ ├── build_paths.lua │ │ ├── force_compile_as_c.lua │ │ ├── force_compile_as_cc.lua │ │ ├── pkg_config.lua │ │ ├── platform_files.lua │ │ ├── single_library.lua │ │ ├── test_suite.lua │ │ └── util.lua │ └── src │ │ └── test_suite_main.cc ├── diff.py ├── generate_map.idc ├── gpu-trace-diff ├── ppc-instructions.xml ├── ppc-table-gen ├── shader-playground │ ├── App.config │ ├── Editor.Designer.cs │ ├── Editor.cs │ ├── Editor.resx │ ├── Program.cs │ ├── README.md │ ├── shader-playground.csproj │ └── shader-playground.sln ├── vswhere │ ├── LICENSE.txt │ └── vswhere.exe └── xenosci │ └── local_runner.py ├── xb ├── xb.bat ├── xb.ps1 ├── xenia-build └── xeniarc /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Google 3 | DerivePointerAlignment: false 4 | PointerAlignment: Left 5 | SortIncludes: true 6 | 7 | # Regroup causes unnecessary noise due to clang-format bug. 8 | IncludeBlocks: Preserve 9 | 10 | --- 11 | Language: Java 12 | DisableFormat: true 13 | SortIncludes: false 14 | -------------------------------------------------------------------------------- /.codacy.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | exclude_paths: 3 | - 'tools/**' 4 | - 'third_party/**' 5 | - 'docs/**' 6 | - 'android/**' 7 | - '**.md' 8 | - 'src/xenia/gpu/shaders/**' 9 | -------------------------------------------------------------------------------- /.gdbinit: -------------------------------------------------------------------------------- 1 | # Ignore HighResolutionTimer custom event 2 | handle SIG34 nostop noprint 3 | # Ignore PosixTimer custom event 4 | handle SIG35 nostop noprint 5 | # Ignore PosixThread exit event 6 | handle SIG32 nostop noprint 7 | # Ignore PosixThread suspend event 8 | handle SIG36 nostop noprint 9 | # Ignore PosixThread user callback event 10 | handle SIG37 nostop noprint 11 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto whitespace=blank-at-eol,tab-in-indent,trailing-space,tabwidth=2 2 | 3 | *.bat text eol=crlf 4 | *.sh text eol=lf 5 | 6 | *.sln text eol=crlf -whitespace 7 | *.csproj text eol=crlf -whitespace merge=union 8 | *.vcxproj text eol=crlf -whitespace merge=union 9 | *.props text eol=crlf -whitespace merge=union 10 | 11 | src/**/shaders/bytecode/** linguist-generated=true 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Xenia Discord server 3 | url: https://discord.gg/Q9mxZf9 4 | about: Tech support for Xenia belongs here. 5 | -------------------------------------------------------------------------------- /android/android_studio_project/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /android/android_studio_project/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /android/android_studio_project/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/java/jp/xenia/XeniaRuntimeException.java: -------------------------------------------------------------------------------- 1 | package jp.xenia; 2 | 3 | /** 4 | * Base class for all unchecked exceptions thrown by the Xenia project components. 5 | */ 6 | public class XeniaRuntimeException extends RuntimeException { 7 | public XeniaRuntimeException() { 8 | } 9 | 10 | public XeniaRuntimeException(final String name) { 11 | super(name); 12 | } 13 | 14 | public XeniaRuntimeException(final String name, final Throwable cause) { 15 | super(name, cause); 16 | } 17 | 18 | public XeniaRuntimeException(final Exception cause) { 19 | super(cause); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/java/jp/xenia/emulator/GpuTraceViewerActivity.java: -------------------------------------------------------------------------------- 1 | package jp.xenia.emulator; 2 | 3 | import android.os.Bundle; 4 | 5 | public class GpuTraceViewerActivity extends WindowedAppActivity { 6 | @Override 7 | protected String getWindowedAppIdentifier() { 8 | return "xenia_gpu_vulkan_trace_viewer"; 9 | } 10 | 11 | @Override 12 | protected void onCreate(final Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | 15 | setContentView(R.layout.activity_gpu_trace_viewer); 16 | setWindowSurfaceView(findViewById(R.id.gpu_trace_viewer_surface_view)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/java/jp/xenia/emulator/WindowDemoActivity.java: -------------------------------------------------------------------------------- 1 | package jp.xenia.emulator; 2 | 3 | import android.os.Bundle; 4 | 5 | public class WindowDemoActivity extends WindowedAppActivity { 6 | @Override 7 | protected String getWindowedAppIdentifier() { 8 | return "xenia_ui_window_vulkan_demo"; 9 | } 10 | 11 | @Override 12 | protected void onCreate(final Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | 15 | setContentView(R.layout.activity_window_demo); 16 | setWindowSurfaceView(findViewById(R.id.window_demo_surface_view)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/layout/activity_gpu_trace_viewer.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/layout/activity_window_demo.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/android_studio_project/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Xenia 3 | GPU Trace Viewer 4 | Window Demo 5 | -------------------------------------------------------------------------------- /android/android_studio_project/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:7.2.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | task clean(type: Delete) { 23 | delete rootProject.buildDir 24 | } -------------------------------------------------------------------------------- /android/android_studio_project/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/android/android_studio_project/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/android_studio_project/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Nov 01 23:19:20 MSK 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /android/android_studio_project/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name = "Xenia" -------------------------------------------------------------------------------- /assets/discord/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/discord/app.png -------------------------------------------------------------------------------- /assets/icon/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/1024.png -------------------------------------------------------------------------------- /assets/icon/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/128.png -------------------------------------------------------------------------------- /assets/icon/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/16.png -------------------------------------------------------------------------------- /assets/icon/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/256.png -------------------------------------------------------------------------------- /assets/icon/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/32.png -------------------------------------------------------------------------------- /assets/icon/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/48.png -------------------------------------------------------------------------------- /assets/icon/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/512.png -------------------------------------------------------------------------------- /assets/icon/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/64.png -------------------------------------------------------------------------------- /assets/icon/extra/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/114.png -------------------------------------------------------------------------------- /assets/icon/extra/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/120.png -------------------------------------------------------------------------------- /assets/icon/extra/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/144.png -------------------------------------------------------------------------------- /assets/icon/extra/150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/150.png -------------------------------------------------------------------------------- /assets/icon/extra/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/152.png -------------------------------------------------------------------------------- /assets/icon/extra/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/180.png -------------------------------------------------------------------------------- /assets/icon/extra/192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/192.png -------------------------------------------------------------------------------- /assets/icon/extra/310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/310.png -------------------------------------------------------------------------------- /assets/icon/extra/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/36.png -------------------------------------------------------------------------------- /assets/icon/extra/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/57.png -------------------------------------------------------------------------------- /assets/icon/extra/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/60.png -------------------------------------------------------------------------------- /assets/icon/extra/70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/70.png -------------------------------------------------------------------------------- /assets/icon/extra/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/72.png -------------------------------------------------------------------------------- /assets/icon/extra/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/76.png -------------------------------------------------------------------------------- /assets/icon/extra/96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/extra/96.png -------------------------------------------------------------------------------- /assets/icon/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icon/icon.ico -------------------------------------------------------------------------------- /assets/icons/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icons/pause.png -------------------------------------------------------------------------------- /assets/icons/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icons/play.png -------------------------------------------------------------------------------- /assets/icons/step_in.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icons/step_in.bmp -------------------------------------------------------------------------------- /assets/icons/step_out.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icons/step_out.bmp -------------------------------------------------------------------------------- /assets/icons/step_over.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icons/step_over.bmp -------------------------------------------------------------------------------- /assets/icons/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/assets/icons/stop.png -------------------------------------------------------------------------------- /docs/images/CPU-JIT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/docs/images/CPU-JIT.png -------------------------------------------------------------------------------- /docs/images/shader_playground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/docs/images/shader_playground.png -------------------------------------------------------------------------------- /docs/instruction_tracing.md: -------------------------------------------------------------------------------- 1 | In x64_tracers.cc: 2 | 3 | Enable tracing: 4 | ``` 5 | #define ITRACE 1 <--- for only ppc instructions 6 | #define DTRACE 1 <--- add HIR data 7 | ``` 8 | 9 | If tracing data, run with the following flags: 10 | ``` 11 | --store_all_context_values 12 | ``` 13 | 14 | By default, tracing will start at the beginning and only for the specified 15 | thread. 16 | 17 | Change traced thread by thread creation ID: 18 | ``` 19 | #define TARGET_THREAD 4 20 | ``` 21 | 22 | To only trace at a certain point, change default trace flag to false: 23 | ``` 24 | bool trace_enabled = true; 25 | ``` 26 | Add a breakpoint: 27 | ``` 28 | --break_on_instruction=0x821009A4 29 | ``` 30 | On break, add the following to the Watch window and set it to true: 31 | ``` 32 | xe::cpu::backend::x64::trace_enabled 33 | ``` 34 | Continue, and watch stuff appear in the log. 35 | -------------------------------------------------------------------------------- /docs/ppc/altivec_instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/docs/ppc/altivec_instructions.pdf -------------------------------------------------------------------------------- /docs/ppc/core_instructions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/docs/ppc/core_instructions.pdf -------------------------------------------------------------------------------- /src/xenia/app/discord/discord_presence.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2020 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_DISCORD_DISCORD_PRESENCE_H_ 11 | #define XENIA_DISCORD_DISCORD_PRESENCE_H_ 12 | 13 | #include 14 | 15 | namespace xe { 16 | namespace discord { 17 | 18 | class DiscordPresence { 19 | public: 20 | static void Initialize(); 21 | static void NotPlaying(); 22 | static void PlayingTitle(const std::string_view game_title); 23 | static void Shutdown(); 24 | }; 25 | 26 | } // namespace discord 27 | } // namespace xe 28 | 29 | #endif // XENIA_DISCORD_DISCORD_PRESENCE_H_ 30 | -------------------------------------------------------------------------------- /src/xenia/app/discord/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-app-discord") 6 | uuid("d14c0885-22d2-40de-ab28-7b234ef2b949") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "discord-rpc" 11 | }) 12 | defines({ 13 | }) 14 | includedirs({ 15 | project_root.."/third_party/discord-rpc/src" 16 | }) 17 | files({ 18 | "discord_presence.cc", 19 | "discord_presence.h" 20 | }) 21 | -------------------------------------------------------------------------------- /src/xenia/app/main_resources.rc: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | 3 | MAINICON ICON "..\\..\\..\\assets\\icon\\icon.ico" 4 | -------------------------------------------------------------------------------- /src/xenia/apu/apu_flags.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/apu/apu_flags.h" 11 | 12 | DEFINE_bool(mute, false, "Mutes all audio output.", "APU") 13 | -------------------------------------------------------------------------------- /src/xenia/apu/apu_flags.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_APU_APU_FLAGS_H_ 11 | #define XENIA_APU_APU_FLAGS_H_ 12 | 13 | #include "xenia/base/cvar.h" 14 | DECLARE_bool(mute) 15 | 16 | #endif // XENIA_APU_APU_FLAGS_H_ 17 | -------------------------------------------------------------------------------- /src/xenia/apu/audio_driver.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/apu/audio_driver.h" 11 | 12 | namespace xe { 13 | namespace apu { 14 | 15 | AudioDriver::~AudioDriver() = default; 16 | 17 | } // namespace apu 18 | } // namespace xe 19 | -------------------------------------------------------------------------------- /src/xenia/apu/debug_visualizers.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | id={id_}, allocated={is_allocated_}, enabled={is_enabled_} 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/xenia/apu/nop/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-apu-nop") 6 | uuid("f37dbf3a-d200-4cc0-83f0-f801b1bdd862") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "xenia-apu", 12 | }) 13 | defines({ 14 | }) 15 | local_platform_files() 16 | -------------------------------------------------------------------------------- /src/xenia/apu/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-apu") 6 | uuid("f4df01f0-50e4-4c67-8f54-61660696cc79") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "libavcodec", 11 | "libavutil", 12 | "libavformat", 13 | "xenia-base", 14 | }) 15 | defines({ 16 | }) 17 | includedirs({ 18 | project_root.."/third_party/FFmpeg/", 19 | }) 20 | local_platform_files() 21 | -------------------------------------------------------------------------------- /src/xenia/apu/sdl/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-apu-sdl") 6 | uuid("153b4e8b-813a-40e6-9366-4b51abc73c45") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-apu", 11 | "xenia-base", 12 | "xenia-helper-sdl", 13 | "SDL2", 14 | }) 15 | defines({ 16 | }) 17 | local_platform_files() 18 | sdl2_include() 19 | -------------------------------------------------------------------------------- /src/xenia/apu/xaudio2/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-apu-xaudio2") 6 | uuid("7a54a497-24d9-4c0e-a013-8507a04231f9") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "xenia-apu", 12 | }) 13 | defines({ 14 | }) 15 | local_platform_files() 16 | -------------------------------------------------------------------------------- /src/xenia/base/README.md: -------------------------------------------------------------------------------- 1 | A lightweight cross-platform/compiler compatibility library. 2 | 3 | This library presupposes C++11/14 support. As more compilers get C++14 it will 4 | assume that. 5 | 6 | Other parts of the project use this to avoid creating spaghetti linkage. Code 7 | specific to the emulator should be kept out, as not all of the projects that 8 | depend on this need it. 9 | 10 | Where possible, C++11/14 STL should be used instead of adding any code in here, 11 | and the code should be kept as small as possible (by reusing STL/etc). Third 12 | party dependencies should be kept to a minimum. 13 | 14 | Target compilers: 15 | * MSVC++ 2013+ 16 | * Clang 3.4+ 17 | * GCC 4.8+. 18 | 19 | Target platforms: 20 | * Windows 8+ (`_win.cc` suffix) 21 | * Mac OSX 10.9+ (`_mac.cc` suffix, falling back to `_posix.cc`) 22 | * Linux ? (`_posix.cc` suffix) 23 | 24 | Avoid the use of platform-specific #ifdefs and instead try to put all 25 | platform-specific code in the appropriately suffixed cc files. 26 | -------------------------------------------------------------------------------- /src/xenia/base/console.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2021 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_BASE_CONSOLE_H_ 11 | #define XENIA_BASE_CONSOLE_H_ 12 | 13 | namespace xe { 14 | 15 | // Returns true if there is a user-visible console attached to receive stdout. 16 | bool has_console_attached(); 17 | 18 | void AttachConsole(); 19 | 20 | } // namespace xe 21 | 22 | #endif // XENIA_BASE_CONSOLE_H_ 23 | -------------------------------------------------------------------------------- /src/xenia/base/console_posix.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2021 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | #include "xenia/base/console.h" 14 | 15 | namespace xe { 16 | 17 | bool has_console_attached() { return isatty(fileno(stdin)) == 1; } 18 | 19 | void AttachConsole() {} 20 | 21 | } // namespace xe 22 | -------------------------------------------------------------------------------- /src/xenia/base/platform_linux.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2020 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_BASE_PLATFORM_LINUX_H_ 11 | #define XENIA_BASE_PLATFORM_LINUX_H_ 12 | 13 | // NOTE: if you're including this file it means you are explicitly depending 14 | // on Linux headers. Including this file outside of linux platform specific 15 | // source code will break portability 16 | #include 17 | 18 | #include "xenia/base/platform.h" 19 | 20 | #endif // XENIA_BASE_PLATFORM_LINUX_H_ 21 | -------------------------------------------------------------------------------- /src/xenia/base/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../.." 2 | include(project_root.."/tools/build") 3 | 4 | project("xenia-base") 5 | uuid("aeadaf22-2b20-4941-b05f-a802d5679c11") 6 | kind("StaticLib") 7 | language("C++") 8 | links({ 9 | "fmt", 10 | }) 11 | defines({ 12 | }) 13 | local_platform_files() 14 | removefiles({"console_app_main_*.cc"}) 15 | removefiles({"main_init_*.cc"}) 16 | files({ 17 | "debug_visualizers.natvis", 18 | }) 19 | 20 | if enableTests then 21 | include("testing") 22 | end -------------------------------------------------------------------------------- /src/xenia/base/testing/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | test_suite("xenia-base-tests", project_root, ".", { 5 | links = { 6 | "fmt", 7 | "xenia-base", 8 | }, 9 | }) 10 | -------------------------------------------------------------------------------- /src/xenia/base/xxhash.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2020 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_BASE_XXHASH_H_ 11 | #define XENIA_BASE_XXHASH_H_ 12 | 13 | #define XXH_INLINE_ALL 14 | 15 | // Can't use XXH_X86DISPATCH because XXH is calculated on multiple threads, 16 | // while the dispatch writes the result (multiple pointers without any 17 | // synchronization) to XXH_g_dispatch at the first call. 18 | 19 | #include "third_party/xxhash/xxhash.h" 20 | 21 | #endif // XENIA_BASE_XXHASH_H_ 22 | -------------------------------------------------------------------------------- /src/xenia/config.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2020 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_CONFIG_H_ 11 | #define XENIA_CONFIG_H_ 12 | 13 | #include 14 | #include "third_party/tomlplusplus/toml.hpp" 15 | 16 | toml::parse_result ParseFile(const std::filesystem::path& filename); 17 | 18 | namespace config { 19 | void SetupConfig(const std::filesystem::path& config_folder); 20 | void LoadGameConfig(const std::string_view title_id); 21 | void SaveConfig(); 22 | } // namespace config 23 | 24 | #endif // XENIA_CONFIG_H_ 25 | -------------------------------------------------------------------------------- /src/xenia/cpp.hint: -------------------------------------------------------------------------------- 1 | // Hint files help the Visual Studio IDE interpret Visual C++ identifiers 2 | // such as names of functions and macros. 3 | // For more information see https://go.microsoft.com/fwlink/?linkid=865984 4 | 5 | #define DECLARE_XAM_EXPORT_(name, category, tags) 6 | #define DECLARE_XAM_EXPORT1(name, category, tag) 7 | #define DECLARE_XAM_EXPORT2(name, category, tag1, tag2) 8 | 9 | #define DECLARE_XBDM_EXPORT_(name, category, tags) 10 | #define DECLARE_XBDM_EXPORT1(name, category, tag) 11 | 12 | #define DECLARE_XBOXKRNL_EXPORT_(name, category, tags) 13 | #define DECLARE_XBOXKRNL_EXPORT1(name, category, tag) 14 | #define DECLARE_XBOXKRNL_EXPORT2(name, category, tag1, tag2) 15 | #define DECLARE_XBOXKRNL_EXPORT3(name, category, tag1, tag2, tag3) 16 | #define DECLARE_XBOXKRNL_EXPORT4(name, category, tag1, tag2, tag3, tag4) 17 | -------------------------------------------------------------------------------- /src/xenia/cpu/backend/assembler.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/cpu/backend/assembler.h" 11 | 12 | namespace xe { 13 | namespace cpu { 14 | namespace backend { 15 | 16 | Assembler::Assembler(Backend* backend) : backend_(backend) {} 17 | 18 | Assembler::~Assembler() { Reset(); } 19 | 20 | bool Assembler::Initialize() { return true; } 21 | 22 | void Assembler::Reset() {} 23 | 24 | } // namespace backend 25 | } // namespace cpu 26 | } // namespace xe 27 | -------------------------------------------------------------------------------- /src/xenia/cpu/backend/x64/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-cpu-backend-x64") 6 | uuid("7d8d5dce-4696-4197-952a-09506f725afe") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "capstone", 11 | "fmt", 12 | "xenia-base", 13 | "xenia-cpu", 14 | }) 15 | defines({ 16 | "CAPSTONE_X86_ATT_DISABLE", 17 | "CAPSTONE_DIET_NO", 18 | "CAPSTONE_X86_REDUCE_NO", 19 | "CAPSTONE_HAS_X86", 20 | "CAPSTONE_USE_SYS_DYN_MEM", 21 | "XBYAK_NO_OP_NAMES", 22 | "XBYAK_ENABLE_OMITTED_OPERAND", 23 | }) 24 | -- Enable VTune, if it's installed. 25 | if os.isdir(project_root.."/third_party/vtune") then 26 | defines { "ENABLE_VTUNE=1" } 27 | end 28 | 29 | includedirs({ 30 | project_root.."/third_party/capstone/include", 31 | }) 32 | local_platform_files() 33 | -------------------------------------------------------------------------------- /src/xenia/cpu/compiler/passes/conditional_group_subpass.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/cpu/compiler/passes/conditional_group_subpass.h" 11 | 12 | #include "xenia/cpu/compiler/compiler.h" 13 | 14 | namespace xe { 15 | namespace cpu { 16 | namespace compiler { 17 | namespace passes { 18 | 19 | ConditionalGroupSubpass::ConditionalGroupSubpass() : CompilerPass() {} 20 | 21 | ConditionalGroupSubpass::~ConditionalGroupSubpass() = default; 22 | 23 | } // namespace passes 24 | } // namespace compiler 25 | } // namespace cpu 26 | } // namespace xe 27 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/ppc_emit.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_CPU_PPC_PPC_EMIT_H_ 11 | #define XENIA_CPU_PPC_PPC_EMIT_H_ 12 | 13 | namespace xe { 14 | namespace cpu { 15 | namespace ppc { 16 | 17 | void RegisterEmitCategoryAltivec(); 18 | void RegisterEmitCategoryALU(); 19 | void RegisterEmitCategoryControl(); 20 | void RegisterEmitCategoryFPU(); 21 | void RegisterEmitCategoryMemory(); 22 | 23 | } // namespace ppc 24 | } // namespace cpu 25 | } // namespace xe 26 | 27 | #endif // XENIA_CPU_PPC_PPC_EMIT_H_ 28 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_fabs.s: -------------------------------------------------------------------------------- 1 | test_fabs_1: 2 | #_ REGISTER_IN f1 1.0 3 | fabs f1, f1 4 | blr 5 | #_ REGISTER_OUT f1 1.0 6 | 7 | test_fabs_2: 8 | #_ REGISTER_IN f1 -1.0 9 | fabs f1, f1 10 | blr 11 | #_ REGISTER_OUT f1 1.0 12 | 13 | test_fabs_3: 14 | #_ REGISTER_IN f1 -1234.0 15 | fabs f1, f1 16 | blr 17 | #_ REGISTER_OUT f1 1234.0 18 | 19 | #test_fabs_cr_1: 20 | # #_ REGISTER_IN f1 1.0 21 | # fabs. f1, f1 22 | # mfcr r12 23 | # blr 24 | # #_ REGISTER_OUT f1 1.0 25 | # #_ REGISTER_OUT r12 0x04000000 26 | 27 | #test_fabs_cr_2: 28 | # #_ REGISTER_IN f1 -1.0 29 | # fabs. f1, f1 30 | # mfcr r12 31 | # blr 32 | # #_ REGISTER_OUT f1 1.0 33 | # #_ REGISTER_OUT r12 0x08000000 34 | 35 | #test_fabs_cr_3: 36 | # #_ REGISTER_IN f1 -1234.0 37 | # fabs. f1, f1 38 | # mfcr r12 39 | # blr 40 | # #_ REGISTER_OUT f1 1234.0 41 | # #_ REGISTER_OUT r12 0x08000000 42 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_fadd.s: -------------------------------------------------------------------------------- 1 | test_fadd_1: 2 | #_ REGISTER_IN f1 1.0 3 | #_ REGISTER_IN f2 2.0 4 | fadd f3, f1, f2 5 | blr 6 | #_ REGISTER_OUT f3 3.0 7 | 8 | test_fadd_2: 9 | #_ REGISTER_IN f1 0.0 10 | #_ REGISTER_IN f2 0.0 11 | fadd f3, f1, f2 12 | blr 13 | #_ REGISTER_OUT f3 0.0 14 | 15 | test_fadd_3: 16 | #_ REGISTER_IN f1 -200.0 17 | #_ REGISTER_IN f2 200.0 18 | fadd f3, f1, f2 19 | blr 20 | #_ REGISTER_OUT f3 0.0 21 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_fmul.s: -------------------------------------------------------------------------------- 1 | test_fmul_1: 2 | #_ REGISTER_IN f1 5.0 3 | #_ REGISTER_IN f2 5.0 4 | fmul f3, f1, f2 5 | blr 6 | #_ REGISTER_OUT f3 25.0 7 | 8 | test_fmul_2: 9 | #_ REGISTER_IN f1 5.0 10 | #_ REGISTER_IN f2 0.0 11 | fmul f3, f1, f2 12 | blr 13 | #_ REGISTER_OUT f3 0.0 14 | 15 | test_fmul_3: 16 | #_ REGISTER_IN f1 -2.0 17 | #_ REGISTER_IN f2 2.0 18 | fmul f3, f1, f2 19 | blr 20 | #_ REGISTER_OUT f3 -4.0 21 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_fnabs.s: -------------------------------------------------------------------------------- 1 | test_fnabs_1: 2 | #_ REGISTER_IN f1 0x400C000000000000 3 | fnabs f2, f1 4 | blr 5 | #_ REGISTER_OUT f2 0xC00C000000000000 6 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_frsqrte.s: -------------------------------------------------------------------------------- 1 | # frsqrte tests disabled because accuracy is CPU dependent. 2 | 3 | test_frsqrte_1: 4 | # _ REGISTER_IN f1 1.0 5 | # frsqrte f1, f1 6 | blr 7 | # _ REGISTER_OUT f1 0.99975585937500000 8 | # want: 0.97 9 | 10 | test_frsqrte_2: 11 | # _ REGISTER_IN f1 64.0 12 | # frsqrte f1, f1 13 | blr 14 | # _ REGISTER_OUT f1 0.12496948242187500 15 | 16 | test_frsqrte_3: 17 | # _ REGISTER_IN f1 0.5 18 | # frsqrte f1, f1 19 | blr 20 | # _ REGISTER_OUT f1 1.41381835937500000 21 | # want: 1.375 22 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_fsel.s: -------------------------------------------------------------------------------- 1 | test_fsel_1: 2 | #_ REGISTER_IN f2 2.0 3 | #_ REGISTER_IN f3 3.0 4 | #_ REGISTER_IN f4 4.0 5 | fsel f1, f2, f3, f4 6 | blr 7 | #_ REGISTER_OUT f1 3.0 8 | #_ REGISTER_OUT f2 2.0 9 | #_ REGISTER_OUT f3 3.0 10 | #_ REGISTER_OUT f4 4.0 11 | 12 | test_fsel_2: 13 | #_ REGISTER_IN f2 -2.0 14 | #_ REGISTER_IN f3 3.0 15 | #_ REGISTER_IN f4 4.0 16 | fsel f1, f2, f3, f4 17 | blr 18 | #_ REGISTER_OUT f1 4.0 19 | #_ REGISTER_OUT f2 -2.0 20 | #_ REGISTER_OUT f3 3.0 21 | #_ REGISTER_OUT f4 4.0 22 | 23 | test_fsel_3: 24 | #_ REGISTER_IN f2 0.0 25 | #_ REGISTER_IN f3 3.0 26 | #_ REGISTER_IN f4 4.0 27 | fsel f1, f2, f3, f4 28 | blr 29 | #_ REGISTER_OUT f1 3.0 30 | #_ REGISTER_OUT f2 0.0 31 | #_ REGISTER_OUT f3 3.0 32 | #_ REGISTER_OUT f4 4.0 33 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_fsqrt.s: -------------------------------------------------------------------------------- 1 | test_fsqrt_1: 2 | #_ REGISTER_IN f1 1.0 3 | fsqrt f1, f1 4 | blr 5 | #_ REGISTER_OUT f1 1.0000000000000000 6 | 7 | test_fsqrt_2: 8 | #_ REGISTER_IN f1 64.0 9 | fsqrt f1, f1 10 | blr 11 | #_ REGISTER_OUT f1 8.0000000000000000 12 | 13 | test_fsqrt_3: 14 | #_ REGISTER_IN f1 0.5 15 | fsqrt f1, f1 16 | blr 17 | #_ REGISTER_OUT f1 0.70710678118654757 18 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_lvl.s: -------------------------------------------------------------------------------- 1 | test_lvl_1: 2 | #_ MEMORY_IN 10001077 0a 0b 0c 0d 0e 0f 10 13 0c 0d 0e 10 11 12 13 14 ff ff ff ff ff ff 3 | #_ REGISTER_IN r4 0x10001077 4 | lvlx v3, r4, r0 5 | blr 6 | #_ REGISTER_OUT r4 0x10001077 7 | #_ REGISTER_OUT v3 [0A0B0C0D, 0E0F1013, 0C000000, 00000000] 8 | 9 | test_lvl_1_constant: 10 | #_ MEMORY_IN 10001077 0a 0b 0c 0d 0e 0f 10 13 0c 0d 0e 10 11 12 13 14 ff ff ff ff ff ff 11 | lis r4, 0x1000 12 | ori r4, r4, 0x1077 13 | lvlx v3, r4, r0 14 | blr 15 | #_ REGISTER_OUT r4 0x10001077 16 | #_ REGISTER_OUT v3 [0A0B0C0D, 0E0F1013, 0C000000, 00000000] 17 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_neg.s: -------------------------------------------------------------------------------- 1 | test_neg_1: 2 | #_ REGISTER_IN r3 0x0000000080000000 3 | neg r3, r3 4 | blr 5 | #_ REGISTER_OUT r3 0xFFFFFFFF80000000 6 | 7 | test_neg_1_constant: 8 | li r3, 1 9 | sldi r3, r3, 31 10 | neg r3, r3 11 | blr 12 | #_ REGISTER_OUT r3 0xFFFFFFFF80000000 13 | 14 | test_neg_2: 15 | #_ REGISTER_IN r3 0x8000000000000000 16 | neg r3, r3 17 | blr 18 | #_ REGISTER_OUT r3 0x8000000000000000 19 | 20 | test_neg_2_constant: 21 | li r3, 1 22 | sldi r3, r3, 63 23 | neg r3, r3 24 | blr 25 | #_ REGISTER_OUT r3 0x8000000000000000 26 | 27 | test_neg_3: 28 | #_ REGISTER_IN r3 0x0000000000000005 29 | neg r3, r3 30 | blr 31 | #_ REGISTER_OUT r3 0xFFFFFFFFFFFFFFFB 32 | 33 | test_neg_3_constant: 34 | li r3, 5 35 | neg r3, r3 36 | blr 37 | #_ REGISTER_OUT r3 0xFFFFFFFFFFFFFFFB 38 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_nor.s: -------------------------------------------------------------------------------- 1 | test_nor_cr_1: 2 | #_ REGISTER_IN r3 0x00000000FFFFFFFF 3 | nor. r3, r3, r3 4 | li r3, 0 5 | bne nor_cr_1_ne 6 | li r3, 1 7 | nor_cr_1_ne: 8 | blr 9 | #_ REGISTER_OUT r3 1 10 | 11 | test_nor_cr_1_constant: 12 | li r3, -1 13 | clrldi r3, r3, 32 14 | nor. r3, r3, r3 15 | li r3, 0 16 | bne nor_cr_1_constant_ne 17 | li r3, 1 18 | nor_cr_1_constant_ne: 19 | blr 20 | #_ REGISTER_OUT r3 1 21 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_ori.s: -------------------------------------------------------------------------------- 1 | .macro make_test_constant dest 2 | lis \dest, 0xDEAD 3 | ori \dest, \dest, 0xBEEF 4 | sldi \dest, \dest, 32 5 | .endm 6 | 7 | test_ori_1: 8 | #_ REGISTER_IN r4 0xDEADBEEF00000000 9 | 10 | ori r3, r4, 0xFEDC 11 | 12 | blr 13 | #_ REGISTER_OUT r3 0xDEADBEEF0000FEDC 14 | #_ REGISTER_OUT r4 0xDEADBEEF00000000 15 | 16 | test_ori_1_constant: 17 | make_test_constant r4 18 | ori r3, r4, 0xFEDC 19 | 20 | blr 21 | #_ REGISTER_OUT r3 0xDEADBEEF0000FEDC 22 | #_ REGISTER_OUT r4 0xDEADBEEF00000000 23 | 24 | test_ori_2: 25 | #_ REGISTER_IN r4 0xDEADBEEF10000000 26 | 27 | ori r3, r4, 0xFEDC 28 | 29 | blr 30 | #_ REGISTER_OUT r3 0xDEADBEEF1000FEDC 31 | #_ REGISTER_OUT r4 0xDEADBEEF10000000 32 | 33 | test_ori_2_constant: 34 | make_test_constant r4 35 | lis r3, 0x1000 36 | or r4, r4, r3 37 | 38 | ori r3, r4, 0xFEDC 39 | 40 | blr 41 | #_ REGISTER_OUT r3 0xDEADBEEF1000FEDC 42 | #_ REGISTER_OUT r4 0xDEADBEEF10000000 43 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_rlwimi.s: -------------------------------------------------------------------------------- 1 | .macro make_full_test_constant dest, a, b, c, d 2 | lis \dest, \a 3 | ori \dest, \dest, \b 4 | sldi \dest, \dest, 32 5 | lis r3, \c 6 | ori r3, r3, \d 7 | clrldi r3, r3, 32 8 | or \dest, \dest, r3 9 | .endm 10 | 11 | test_rlwimi: 12 | #_ REGISTER_IN r4 0xCAFEBABE90003000 13 | #_ REGISTER_IN r6 0xDEADBEEF00000003 14 | rlwimi r6, r4, 2, 0, 0x1D 15 | blr 16 | #_ REGISTER_OUT r4 0xCAFEBABE90003000 17 | #_ REGISTER_OUT r6 0xDEADBEEF4000C003 18 | 19 | test_rlwimi_constant: 20 | make_full_test_constant r4, 0xCAFE, 0xBABE, 0x9000, 0x3000 21 | make_full_test_constant r6, 0xDEAD, 0xBEEF, 0x0000, 0x0003 22 | rlwimi r6, r4, 2, 0, 0x1D 23 | blr 24 | #_ REGISTER_OUT r4 0xCAFEBABE90003000 25 | #_ REGISTER_OUT r6 0xDEADBEEF4000C003 26 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vaddfp.s: -------------------------------------------------------------------------------- 1 | test_vaddfp_1: 2 | # v3 = [10.0, -10.0, 15.0, -15.0] 3 | # v4 = [-10.0, 20.0, -20.0, 30.0] 4 | #_ REGISTER_IN v3 [41200000, C1200000, 41700000, C1700000] 5 | #_ REGISTER_IN v4 [C1200000, 41A00000, C1A00000, 41F00000] 6 | vaddfp v3, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [00000000, 41200000, C0A00000, 41700000] 9 | #_ REGISTER_OUT v4 [C1200000, 41A00000, C1A00000, 41F00000] 10 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vaddfp128.s: -------------------------------------------------------------------------------- 1 | test_vaddfp128_1: 2 | # v3 = [10.0, -10.0, 15.0, -15.0] 3 | # v4 = [-10.0, 20.0, -20.0, 30.0] 4 | #_ REGISTER_IN v3 [41200000, C1200000, 41700000, C1700000] 5 | #_ REGISTER_IN v4 [C1200000, 41A00000, C1A00000, 41F00000] 6 | vaddfp128 v0, v3, v4 7 | blr 8 | #_ REGISTER_OUT v0 [00000000, 41200000, C0A00000, 41700000] 9 | #_ REGISTER_OUT v3 [41200000, C1200000, 41700000, C1700000] 10 | #_ REGISTER_OUT v4 [C1200000, 41A00000, C1A00000, 41F00000] 11 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vaddshs.s: -------------------------------------------------------------------------------- 1 | test_vaddshs_1: 2 | #_ REGISTER_IN v3 [7FFF8001, 7FFF8003, 7FFF8005, 80068007] 3 | #_ REGISTER_IN v4 [00018001, 10000000, 42568124, 00000000] 4 | vaddshs v3, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [7fff8000, 7fff8003, 7fff8000, 80068007] 7 | #_ REGISTER_OUT v4 [00018001, 10000000, 42568124, 00000000] 8 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vadduhm.s: -------------------------------------------------------------------------------- 1 | test_vadduhm_1: 2 | #_ REGISTER_IN v3 [7FFF8001, 7FFF8003, 7FFF8005, 80068007] 3 | #_ REGISTER_IN v4 [00018001, 10000000, 42568124, 00000000] 4 | vadduhm v3, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [80000002, 8fff8003, c2550129, 80068007] 7 | #_ REGISTER_OUT v4 [00018001, 10000000, 42568124, 00000000] 8 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vand.s: -------------------------------------------------------------------------------- 1 | test_vand_1: 2 | #_ REGISTER_IN v3 [FFFF0101, 7070FFFF, 7FFFFFFF, 00000000] 3 | #_ REGISTER_IN v4 [80081010, 808F0020, 7FFFFFF0, 8FFFFFFF] 4 | vand v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [FFFF0101, 7070FFFF, 7FFFFFFF, 00000000] 7 | #_ REGISTER_OUT v4 [80081010, 808F0020, 7FFFFFF0, 8FFFFFFF] 8 | #_ REGISTER_OUT v5 [80080000, 00000020, 7FFFFFF0, 00000000] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vand128.s: -------------------------------------------------------------------------------- 1 | test_vand128_1: 2 | #_ REGISTER_IN v3 [FFFF0101, 7070FFFF, 7FFFFFFF, 00000000] 3 | #_ REGISTER_IN v4 [80081010, 808F0020, 7FFFFFF0, 8FFFFFFF] 4 | vand128 v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [FFFF0101, 7070FFFF, 7FFFFFFF, 00000000] 7 | #_ REGISTER_OUT v4 [80081010, 808F0020, 7FFFFFF0, 8FFFFFFF] 8 | #_ REGISTER_OUT v5 [80080000, 00000020, 7FFFFFF0, 00000000] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vandc.s: -------------------------------------------------------------------------------- 1 | test_vandc_1: 2 | #_ REGISTER_IN v3 [FFFF0101, 7070FFFF, 7FFFFFFF, 00000000] 3 | #_ REGISTER_IN v4 [80081010, 808F0020, 7FFFFFF0, 8FFFFFFF] 4 | vandc v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [FFFF0101, 7070FFFF, 7FFFFFFF, 00000000] 7 | #_ REGISTER_OUT v4 [80081010, 808F0020, 7FFFFFF0, 8FFFFFFF] 8 | #_ REGISTER_OUT v5 [7FF70101, 7070FFDF, 0000000F, 00000000] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vandc128.s: -------------------------------------------------------------------------------- 1 | test_vandc128_1: 2 | #_ REGISTER_IN v3 [FFFF0101, 7070FFFF, 7FFFFFFF, 00000000] 3 | #_ REGISTER_IN v4 [80081010, 808F0020, 7FFFFFF0, 8FFFFFFF] 4 | vandc128 v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [FFFF0101, 7070FFFF, 7FFFFFFF, 00000000] 7 | #_ REGISTER_OUT v4 [80081010, 808F0020, 7FFFFFF0, 8FFFFFFF] 8 | #_ REGISTER_OUT v5 [7FF70101, 7070FFDF, 0000000F, 00000000] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vavgsh.s: -------------------------------------------------------------------------------- 1 | #vavgsh isn't implemented 2 | #test_vavgsh_1: 3 | # #_ REGISTER_IN v3 [00000001, 00020003, 00040005, 00060007] 4 | # #_ REGISTER_IN v4 [00080009, 000A000B, 000C000D, 000E000F] 5 | # vavgsh v5, v3, v4 6 | # blr 7 | # #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] 8 | # #_ REGISTER_OUT v4 [00080009, 000A000B, 000C000D, 000E000F] 9 | # #_ REGISTER_OUT v5 [00040005, 00060007, 00080009, 000A000B] 10 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vavguh.s: -------------------------------------------------------------------------------- 1 | test_vavguh_1: 2 | #_ REGISTER_IN v3 [00000001, 00020003, 00040005, 00060007] 3 | #_ REGISTER_IN v4 [00080009, 000A000B, 000C000D, 000E000F] 4 | vavguh v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] 7 | #_ REGISTER_OUT v4 [00080009, 000A000B, 000C000D, 000E000F] 8 | #_ REGISTER_OUT v5 [00040005, 00060007, 00080009, 000A000B] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vcfsx.s: -------------------------------------------------------------------------------- 1 | test_vcfsx_1: 2 | #_ REGISTER_IN v3 [3f800000, 3fc00000, 3f8ccccd, 3ff33333] 3 | # 1.0, 1.5, 1.1, 1.9 4 | vcfsx v3, v3, 0 5 | blr 6 | #_ REGISTER_OUT v3 [4e7e0000, 4e7f0000, 4e7e3333, 4e7fcccd] 7 | 8 | test_vcfsx_2: 9 | #_ REGISTER_IN v3 [3f800000, 3fc00000, 3f8ccccd, 3ff33333] 10 | # 1.0, 1.5, 1.1, 1.9 11 | vcfsx v3, v3, 1 12 | blr 13 | #_ REGISTER_OUT v3 [4dfe0000, 4dff0000, 4dfe3333, 4dffcccd] 14 | 15 | test_vcfsx_3: 16 | #_ REGISTER_IN v3 [3f800000, 3fc00000, 3f8ccccd, 3ff33333] 17 | # 1.0, 1.5, 1.1, 1.9 18 | vcfsx v3, v3, 10 19 | blr 20 | #_ REGISTER_OUT v3 [497e0000, 497f0000, 497e3333, 497fcccd] 21 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vexptefp.s: -------------------------------------------------------------------------------- 1 | test_vexptefp_1: 2 | #_ REGISTER_IN v3 [40000000, 40400000, 40800000, 40A00000] 3 | vexptefp v4, v3 4 | blr 5 | #_ REGISTER_OUT v3 [40000000, 40400000, 40800000, 40A00000] 6 | #_ REGISTER_OUT v4 [40800000, 41000000, 41800000, 42000000] 7 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vmaxfp.s: -------------------------------------------------------------------------------- 1 | test_vmaxfp_1: 2 | # v3 = [10.0, -10.0, 15.0, -15.0] 3 | # v4 = [-10.0, 20.0, -20.0, 30.0] 4 | #_ REGISTER_IN v3 [41200000, C1200000, 41700000, C1700000] 5 | #_ REGISTER_IN v4 [C1200000, 41A00000, C1A00000, 41F00000] 6 | vmaxfp v0, v3, v4 7 | blr 8 | #_ REGISTER_OUT v0 [41200000, 41A00000, 41700000, 41F00000] 9 | #_ REGISTER_OUT v3 [41200000, C1200000, 41700000, C1700000] 10 | #_ REGISTER_OUT v4 [C1200000, 41A00000, C1A00000, 41F00000] 11 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vmaxfp128.s: -------------------------------------------------------------------------------- 1 | test_vmaxfp128_1: 2 | # v3 = [10.0, -10.0, 15.0, -15.0] 3 | # v4 = [-10.0, 20.0, -20.0, 30.0] 4 | #_ REGISTER_IN v3 [41200000, C1200000, 41700000, C1700000] 5 | #_ REGISTER_IN v4 [C1200000, 41A00000, C1A00000, 41F00000] 6 | vmaxfp128 v0, v3, v4 7 | blr 8 | #_ REGISTER_OUT v0 [41200000, 41A00000, 41700000, 41F00000] 9 | #_ REGISTER_OUT v3 [41200000, C1200000, 41700000, C1700000] 10 | #_ REGISTER_OUT v4 [C1200000, 41A00000, C1A00000, 41F00000] 11 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vmaxsh.s: -------------------------------------------------------------------------------- 1 | test_vmaxsh_1: 2 | #_ REGISTER_IN v3 [00000001, 00020003, 00040005, 80060007] 3 | #_ REGISTER_IN v4 [00080009, 000A000B, 000C000D, 000E000F] 4 | vmaxsh v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 80060007] 7 | #_ REGISTER_OUT v4 [00080009, 000A000B, 000C000D, 000E000F] 8 | #_ REGISTER_OUT v5 [00080009, 000A000B, 000C000D, 000E000F] 9 | 10 | test_vmaxsh_2: 11 | #_ REGISTER_IN v3 [00000009, 0002000B, 0004000D, 0006000F] 12 | #_ REGISTER_IN v4 [00080001, 000A0003, 000C0005, 000E0007] 13 | vmaxsh v5, v3, v4 14 | blr 15 | #_ REGISTER_OUT v3 [00000009, 0002000B, 0004000D, 0006000F] 16 | #_ REGISTER_OUT v4 [00080001, 000A0003, 000C0005, 000E0007] 17 | #_ REGISTER_OUT v5 [00080009, 000A000B, 000C000D, 000E000F] 18 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vmaxuh.s: -------------------------------------------------------------------------------- 1 | test_vmaxuh_1: 2 | #_ REGISTER_IN v3 [00000001, 00020003, 00040005, 00060007] 3 | #_ REGISTER_IN v4 [00080009, 000A000B, 000C000D, 800E000F] 4 | vmaxuh v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] 7 | #_ REGISTER_OUT v4 [00080009, 000A000B, 000C000D, 800E000F] 8 | #_ REGISTER_OUT v5 [00080009, 000A000B, 000C000D, 800E000F] 9 | 10 | test_vmaxuh_2: 11 | #_ REGISTER_IN v3 [00000009, 0002000B, 0004000D, 0006000F] 12 | #_ REGISTER_IN v4 [00080001, 000A0003, 000C0005, 000E0007] 13 | vmaxuh v5, v3, v4 14 | blr 15 | #_ REGISTER_OUT v3 [00000009, 0002000B, 0004000D, 0006000F] 16 | #_ REGISTER_OUT v4 [00080001, 000A0003, 000C0005, 000E0007] 17 | #_ REGISTER_OUT v5 [00080009, 000A000B, 000C000D, 000E000F] 18 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vminfp.s: -------------------------------------------------------------------------------- 1 | test_vminfp_1: 2 | # v3 = [10.0, -10.0, 15.0, -15.0] 3 | # v4 = [-10.0, 20.0, -20.0, 30.0] 4 | #_ REGISTER_IN v3 [41200000, C1200000, 41700000, C1700000] 5 | #_ REGISTER_IN v4 [C1200000, 41A00000, C1A00000, 41F00000] 6 | vminfp v0, v3, v4 7 | blr 8 | #_ REGISTER_OUT v0 [C1200000, C1200000, C1A00000, C1700000] 9 | #_ REGISTER_OUT v3 [41200000, C1200000, 41700000, C1700000] 10 | #_ REGISTER_OUT v4 [C1200000, 41A00000, C1A00000, 41F00000] 11 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vminfp128.s: -------------------------------------------------------------------------------- 1 | test_vminfp128_1: 2 | # v3 = [10.0, -10.0, 15.0, -15.0] 3 | # v4 = [-10.0, 20.0, -20.0, 30.0] 4 | #_ REGISTER_IN v3 [41200000, C1200000, 41700000, C1700000] 5 | #_ REGISTER_IN v4 [C1200000, 41A00000, C1A00000, 41F00000] 6 | vminfp128 v0, v3, v4 7 | blr 8 | #_ REGISTER_OUT v0 [C1200000, C1200000, C1A00000, C1700000] 9 | #_ REGISTER_OUT v3 [41200000, C1200000, 41700000, C1700000] 10 | #_ REGISTER_OUT v4 [C1200000, 41A00000, C1A00000, 41F00000] 11 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vminsh.s: -------------------------------------------------------------------------------- 1 | test_vminsh_1: 2 | #_ REGISTER_IN v3 [00000001, 00020003, 00040005, 00060007] 3 | #_ REGISTER_IN v4 [00080009, 000A000B, 000C000D, 000E000F] 4 | vminsh v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] 7 | #_ REGISTER_OUT v4 [00080009, 000A000B, 000C000D, 000E000F] 8 | #_ REGISTER_OUT v5 [00000001, 00020003, 00040005, 00060007] 9 | 10 | test_vminsh_2: 11 | #_ REGISTER_IN v3 [00000009, 0002000B, 0004000D, 0006000F] 12 | #_ REGISTER_IN v4 [00080001, 000A0003, 000C0005, 000E0007] 13 | vminsh v5, v3, v4 14 | blr 15 | #_ REGISTER_OUT v3 [00000009, 0002000B, 0004000D, 0006000F] 16 | #_ REGISTER_OUT v4 [00080001, 000A0003, 000C0005, 000E0007] 17 | #_ REGISTER_OUT v5 [00000001, 00020003, 00040005, 00060007] 18 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vminuh.s: -------------------------------------------------------------------------------- 1 | test_vminuh_1: 2 | #_ REGISTER_IN v3 [00000001, 00020003, 00040005, 00060007] 3 | #_ REGISTER_IN v4 [00080009, 000A000B, 000C000D, 000E000F] 4 | vminuh v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] 7 | #_ REGISTER_OUT v4 [00080009, 000A000B, 000C000D, 000E000F] 8 | #_ REGISTER_OUT v5 [00000001, 00020003, 00040005, 00060007] 9 | 10 | test_vminuh_2: 11 | #_ REGISTER_IN v3 [00000009, 0002000B, 0004000D, 0006000F] 12 | #_ REGISTER_IN v4 [00080001, 000A0003, 000C0005, 000E0007] 13 | vminuh v5, v3, v4 14 | blr 15 | #_ REGISTER_OUT v3 [00000009, 0002000B, 0004000D, 0006000F] 16 | #_ REGISTER_OUT v4 [00080001, 000A0003, 000C0005, 000E0007] 17 | #_ REGISTER_OUT v5 [00000001, 00020003, 00040005, 00060007] 18 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vmrghb.s: -------------------------------------------------------------------------------- 1 | test_vmrghb_1: 2 | #_ REGISTER_IN v3 [00010203, 04050607, 08090A0B, 0C0D0E0F] 3 | #_ REGISTER_IN v4 [10111213, 14151617, 18191A1B, 1C1D1E1F] 4 | vmrghb v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [00010203, 04050607, 08090A0B, 0C0D0E0F] 7 | #_ REGISTER_OUT v4 [10111213, 14151617, 18191A1B, 1C1D1E1F] 8 | #_ REGISTER_OUT v5 [00100111, 02120313, 04140515, 06160717] 9 | 10 | test_vmrghb_2: 11 | #_ REGISTER_IN v3 [F0F1F2F3, F4F5F6F7, F8F9FAFB, FCFDFEFF] 12 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 13 | vmrghb v5, v3, v4 14 | blr 15 | #_ REGISTER_OUT v3 [F0F1F2F3, F4F5F6F7, F8F9FAFB, FCFDFEFF] 16 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 17 | #_ REGISTER_OUT v5 [F000F101, F202F303, F404F505, F606F707] 18 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vmrglb.s: -------------------------------------------------------------------------------- 1 | test_vmrglb_1: 2 | #_ REGISTER_IN v3 [00010203, 04050607, 08090A0B, 0C0D0E0F] 3 | #_ REGISTER_IN v4 [10111213, 14151617, 18191A1B, 1C1D1E1F] 4 | vmrglb v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [00010203, 04050607, 08090A0B, 0C0D0E0F] 7 | #_ REGISTER_OUT v4 [10111213, 14151617, 18191A1B, 1C1D1E1F] 8 | #_ REGISTER_OUT v5 [08180919, 0a1a0b1b, 0c1c0d1d, 0e1e0f1f] 9 | 10 | test_vmrglb_2: 11 | #_ REGISTER_IN v3 [F0F1F2F3, F4F5F6F7, F8F9FAFB, FCFDFEFF] 12 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 13 | vmrglb v5, v3, v4 14 | blr 15 | #_ REGISTER_OUT v3 [F0F1F2F3, F4F5F6F7, F8F9FAFB, FCFDFEFF] 16 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 17 | #_ REGISTER_OUT v5 [F808F909, FA0AFB0B, FC0CFD0D, FE0EFF0F] 18 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vmsum3fp128.s: -------------------------------------------------------------------------------- 1 | test_vmsum3fp128_1: 2 | # v3 = [1.0, 1.5, 1.1, 0.0] 3 | # v4 = [2.0, 3.75, 2.31, 0.0] 4 | #_ REGISTER_IN v3 [3f800000, 3fc00000, 3f8ccccd, 01020304] 5 | #_ REGISTER_IN v4 [40000000, 40700000, 4013d70a, 01020304] 6 | vmsum3fp128 v5, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [3f800000, 3fc00000, 3f8ccccd, 01020304] 9 | #_ REGISTER_OUT v4 [40000000, 40700000, 4013d70a, 01020304] 10 | #_ REGISTER_OUT v5 [4122A7F0, 4122A7F0, 4122A7F0, 4122A7F0] 11 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vmsum4fp128.s: -------------------------------------------------------------------------------- 1 | test_vmsum4fp128_1: 2 | #_ REGISTER_IN v3 [3f800000, 3fc00000, 3f8ccccd, 3ff33333] 3 | #_ REGISTER_IN v4 [40000000, 40700000, 4013d70a, 40b051eb] 4 | vmsum4fp128 v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [3f800000, 3fc00000, 3f8ccccd, 3ff33333] 7 | #_ REGISTER_OUT v4 [40000000, 40700000, 4013d70a, 40b051eb] 8 | #_ REGISTER_OUT v5 [41A5147B, 41A5147B, 41A5147B, 41A5147B] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vor.s: -------------------------------------------------------------------------------- 1 | test_vor_1: 2 | #_ REGISTER_IN v3 [FFFF0101, 7070FFFF, FFFFFFFF, 00000000] 3 | #_ REGISTER_IN v4 [80081010, 808F0000, 00000000, 8FFFFFFF] 4 | vor v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [FFFF0101, 7070FFFF, FFFFFFFF, 00000000] 7 | #_ REGISTER_OUT v4 [80081010, 808F0000, 00000000, 8FFFFFFF] 8 | #_ REGISTER_OUT v5 [FFFF1111, F0FFFFFF, FFFFFFFF, 8FFFFFFF] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vor128.s: -------------------------------------------------------------------------------- 1 | test_vor128_1: 2 | #_ REGISTER_IN v3 [FFFF0101, 7070FFFF, FFFFFFFF, 00000000] 3 | #_ REGISTER_IN v4 [80081010, 808F0000, 00000000, 8FFFFFFF] 4 | vor128 v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [FFFF0101, 7070FFFF, FFFFFFFF, 00000000] 7 | #_ REGISTER_OUT v4 [80081010, 808F0000, 00000000, 8FFFFFFF] 8 | #_ REGISTER_OUT v5 [FFFF1111, F0FFFFFF, FFFFFFFF, 8FFFFFFF] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vpkpx.s: -------------------------------------------------------------------------------- 1 | #vpkpx isn't implemented yet 2 | #test_vpkpx_1: 3 | # #_ REGISTER_IN v3 [00101820, 01283038, 00404850, 01586068] 4 | # #_ REGISTER_IN v4 [01707880, 00889098, 01A0A8B0, 00B8C0C8] 5 | # vpkpx v5, v3, v4 6 | # blr 7 | # #_ REGISTER_OUT v3 [00101820, 01283038, 00404850, 01586068] 8 | # #_ REGISTER_OUT v4 [01707880, 00889098, 01A0A8B0, 00B8C0C8] 9 | # #_ REGISTER_OUT v5 [086494C7, 212AAD8D, B9F04653, D2B65F19] 10 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vpkshus.s: -------------------------------------------------------------------------------- 1 | test_vpkshus_1: 2 | # {-1, -128, 0, 127, -2, -129, 1, 128} 3 | #_ REGISTER_IN v3 [FFFFFF80, 0000007F, FFFEFF7F, 00010080] 4 | # {-3, -130, 2, 129, -4, -131, 3, 130} 5 | #_ REGISTER_IN v4 [FFFDFF7E, 00020081, FFFCFF7D, 00030082] 6 | vpkshus v5, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [FFFFFF80, 0000007F, FFFEFF7F, 00010080] 9 | #_ REGISTER_OUT v4 [FFFDFF7E, 00020081, FFFCFF7D, 00030082] 10 | # {0, 0, 0, 127, 0, 0, 1, 128, 0, 0, 2, 129, 0, 0, 3, 130} 11 | #_ REGISTER_OUT v5 [0000007F, 00000180, 00000281, 00000382] 12 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vpkshus128.s: -------------------------------------------------------------------------------- 1 | test_vpkshus128_1: 2 | # {-1, -128, 0, 127, -2, -129, 1, 128} 3 | #_ REGISTER_IN v3 [FFFFFF80, 0000007F, FFFEFF7F, 00010080] 4 | # {-3, -130, 2, 129, -4, -131, 3, 130} 5 | #_ REGISTER_IN v4 [FFFDFF7E, 00020081, FFFCFF7D, 00030082] 6 | vpkshus128 v5, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [FFFFFF80, 0000007F, FFFEFF7F, 00010080] 9 | #_ REGISTER_OUT v4 [FFFDFF7E, 00020081, FFFCFF7D, 00030082] 10 | # {0, 0, 0, 127, 0, 0, 1, 128, 0, 0, 2, 129, 0, 0, 3, 130} 11 | #_ REGISTER_OUT v5 [0000007F, 00000180, 00000281, 00000382] 12 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vpkswus.s: -------------------------------------------------------------------------------- 1 | test_vpkswus_1: 2 | # {-1, -32768, 0, 32767} 3 | #_ REGISTER_IN v3 [FFFFFFFF, FFFF8000, 00000000, 00007FFF] 4 | # {-2, -32769, 1, 32768} 5 | #_ REGISTER_IN v4 [FFFFFFFE, FFFF7FFF, 00000001, 00008000] 6 | vpkswus v5, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [FFFFFFFF, FFFF8000, 00000000, 00007FFF] 9 | #_ REGISTER_OUT v4 [FFFFFFFE, FFFF7FFF, 00000001, 00008000] 10 | # {0, 0, 0, 32767, 0, 0, 1, 32768} 11 | #_ REGISTER_OUT v5 [00000000, 00007FFF, 00000000, 00018000] 12 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vpkswus128.s: -------------------------------------------------------------------------------- 1 | test_vpkswus128_1: 2 | # {-1, -32768, 0, 32767} 3 | #_ REGISTER_IN v3 [FFFFFFFF, FFFF8000, 00000000, 00007FFF] 4 | # {-2, -32769, 1, 32768} 5 | #_ REGISTER_IN v4 [FFFFFFFE, FFFF7FFF, 00000001, 00008000] 6 | vpkswus128 v5, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [FFFFFFFF, FFFF8000, 00000000, 00007FFF] 9 | #_ REGISTER_OUT v4 [FFFFFFFE, FFFF7FFF, 00000001, 00008000] 10 | # {0, 0, 0, 32767, 0, 0, 1, 32768} 11 | #_ REGISTER_OUT v5 [00000000, 00007FFF, 00000000, 00018000] 12 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vpkuhus.s: -------------------------------------------------------------------------------- 1 | test_vpkuhus_1: 2 | # {0, 256, 1, 257, 2, 258, 3, 259} 3 | #_ REGISTER_IN v3 [00000100, 00010101, 00020102, 00030103] 4 | # {4, 260, 5, 261, 6, 262, 7, 263} 5 | #_ REGISTER_IN v4 [00040104, 00050105, 00060106, 00070107] 6 | vpkuhus v5, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [00000100, 00010101, 00020102, 00030103] 9 | #_ REGISTER_OUT v4 [00040104, 00050105, 00060106, 00070107] 10 | # {0, 255, 1, 255, 2, 255, 3, 255, 4, 255, 5, 255, 6, 255, 7, 255} 11 | #_ REGISTER_OUT v5 [00FF01FF, 02FF03FF, 04FF05FF, 06FF07FF] 12 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vpkuhus128.s: -------------------------------------------------------------------------------- 1 | test_vpkuhus128_1: 2 | # {0, 256, 1, 257, 2, 258, 3, 259} 3 | #_ REGISTER_IN v3 [00000100, 00010101, 00020102, 00030103] 4 | # {4, 260, 5, 261, 6, 262, 7, 263} 5 | #_ REGISTER_IN v4 [00040104, 00050105, 00060106, 00070107] 6 | vpkuhus128 v5, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [00000100, 00010101, 00020102, 00030103] 9 | #_ REGISTER_OUT v4 [00040104, 00050105, 00060106, 00070107] 10 | # {0, 255, 1, 255, 2, 255, 3, 255, 4, 255, 5, 255, 6, 255, 7, 255} 11 | #_ REGISTER_OUT v5 [00FF01FF, 02FF03FF, 04FF05FF, 06FF07FF] 12 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vpkuwus.s: -------------------------------------------------------------------------------- 1 | test_vpkuwus_1: 2 | # {0, 65536, 1, 65537} 3 | #_ REGISTER_IN v3 [00000000, 00010000, 00000001, 00010001] 4 | # {2, 65538, 3, 65539} 5 | #_ REGISTER_IN v4 [00000002, 00010002, 00000003, 00010003] 6 | vpkuwus v5, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [00000000, 00010000, 00000001, 00010001] 9 | #_ REGISTER_OUT v4 [00000002, 00010002, 00000003, 00010003] 10 | # {0, 65535, 1, 65535, 2, 65535, 3, 65535} 11 | #_ REGISTER_OUT v5 [0000FFFF, 0001FFFF, 0002FFFF, 0003FFFF] 12 | 13 | test_vpkuwus_2: 14 | # {2147483648, 2147483647, 2, 3} 15 | #_ REGISTER_IN v3 [80000000, 7FFFFFFF, 00000002, 00000003] 16 | # {4294967295, 65538, 4294967294, 16} 17 | #_ REGISTER_IN v4 [FFFFFFFF, 00010002, FFFFFFFE, 00000010] 18 | vpkuwus v5, v3, v4 19 | blr 20 | #_ REGISTER_OUT v3 [80000000, 7FFFFFFF, 00000002, 00000003] 21 | #_ REGISTER_OUT v4 [FFFFFFFF, 00010002, FFFFFFFE, 00000010] 22 | # {65535, 65535, 2, 3, 65535, 65535, 65535, 16} 23 | #_ REGISTER_OUT v5 [FFFFFFFF, 00020003, FFFFFFFF, FFFF0010] 24 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vpkuwus128.s: -------------------------------------------------------------------------------- 1 | test_vpkuwus128_1: 2 | # {0, 65536, 1, 65537} 3 | #_ REGISTER_IN v3 [00000000, 00010000, 00000001, 00010001] 4 | # {2, 65538, 3, 65539} 5 | #_ REGISTER_IN v4 [00000002, 00010002, 00000003, 00010003] 6 | vpkuwus128 v5, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [00000000, 00010000, 00000001, 00010001] 9 | #_ REGISTER_OUT v4 [00000002, 00010002, 00000003, 00010003] 10 | # {0, 65535, 1, 65535, 2, 65535, 3, 65535} 11 | #_ REGISTER_OUT v5 [0000FFFF, 0001FFFF, 0002FFFF, 0003FFFF] 12 | 13 | test_vpkuwus128_2: 14 | # {2147483648, 2147483647, 2, 3} 15 | #_ REGISTER_IN v3 [80000000, 7FFFFFFF, 00000002, 00000003] 16 | # {4294967295, 65538, 4294967294, 16} 17 | #_ REGISTER_IN v4 [FFFFFFFF, 00010002, FFFFFFFE, 00000010] 18 | vpkuwus128 v5, v3, v4 19 | blr 20 | #_ REGISTER_OUT v3 [80000000, 7FFFFFFF, 00000002, 00000003] 21 | #_ REGISTER_OUT v4 [FFFFFFFF, 00010002, FFFFFFFE, 00000010] 22 | # {65535, 65535, 2, 3, 65535, 65535, 65535, 16} 23 | #_ REGISTER_OUT v5 [FFFFFFFF, 00020003, FFFFFFFF, FFFF0010] 24 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vrfin.s: -------------------------------------------------------------------------------- 1 | test_vrfin_1: 2 | #_ REGISTER_IN v3 [3f800000, 3fc00000, 3f8ccccd, 3ff33333] 3 | # 1.0, 1.5, 1.1, 1.9 -> 1.0, 2.0, 1.0, 2.0 4 | vrfin v3, v3 5 | blr 6 | #_ REGISTER_OUT v3 [3f800000, 40000000, 3f800000, 40000000] 7 | 8 | test_vrfin_2: 9 | #_ REGISTER_IN v3 [bf800000, bfc00000, bf8ccccd, bff33333] 10 | # -1.0, -1.5, -1.1, -1.9 -> -1.0, -2.0, -1.0, -2.0 11 | vrfin v3, v3 12 | blr 13 | #_ REGISTER_OUT v3 [bf800000, c0000000, bf800000, c0000000] 14 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vrlh.s: -------------------------------------------------------------------------------- 1 | test_vrlh_1: 2 | #_ REGISTER_IN v3 [12345678, 87654321, 11223344, 55667788] 3 | #_ REGISTER_IN v4 [000D000D, 000D000D, 000D000D, 000D000D] 4 | vrlh v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [12345678, 87654321, 11223344, 55667788] 7 | #_ REGISTER_OUT v4 [000D000D, 000D000D, 000D000D, 000D000D] 8 | #_ REGISTER_OUT v5 [82460ACF, B0EC2864, 42248668, CAAC0EF1] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vspltb.s: -------------------------------------------------------------------------------- 1 | test_vspltb_1: 2 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 3 | vspltb v3, v4, 0 4 | blr 5 | #_ REGISTER_OUT v3 [00000000, 00000000, 00000000, 00000000] 6 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 7 | 8 | test_vspltb_2: 9 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 10 | vspltb v3, v4, 1 11 | blr 12 | #_ REGISTER_OUT v3 [01010101, 01010101, 01010101, 01010101] 13 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 14 | 15 | test_vspltb_3: 16 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 17 | vspltb v3, v4, 0xF 18 | blr 19 | #_ REGISTER_OUT v3 [0F0F0F0F, 0F0F0F0F, 0F0F0F0F, 0F0F0F0F] 20 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 21 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vsplth.s: -------------------------------------------------------------------------------- 1 | test_vsplth_1: 2 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 3 | vsplth v3, v4, 0 4 | blr 5 | #_ REGISTER_OUT v3 [00010001, 00010001, 00010001, 00010001] 6 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 7 | 8 | test_vsplth_2: 9 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 10 | vsplth v3, v4, 1 11 | blr 12 | #_ REGISTER_OUT v3 [02030203, 02030203, 02030203, 02030203] 13 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 14 | 15 | test_vsplth_3: 16 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 17 | vsplth v3, v4, 7 18 | blr 19 | #_ REGISTER_OUT v3 [0E0F0E0F, 0E0F0E0F, 0E0F0E0F, 0E0F0E0F] 20 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 21 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vspltisb.s: -------------------------------------------------------------------------------- 1 | test_vspltisb_1: 2 | vspltisb v3, 0 3 | blr 4 | #_ REGISTER_OUT v3 [00000000, 00000000, 00000000, 00000000] 5 | 6 | test_vspltisb_2: 7 | vspltisb v3, 1 8 | blr 9 | #_ REGISTER_OUT v3 [01010101, 01010101, 01010101, 01010101] 10 | 11 | test_vspltisb_3: 12 | vspltisb v3, -1 13 | blr 14 | #_ REGISTER_OUT v3 [FFFFFFFF, FFFFFFFF, FFFFFFFF, FFFFFFFF] 15 | 16 | test_vspltisb_4: 17 | vspltisb v3, -2 18 | blr 19 | #_ REGISTER_OUT v3 [FEFEFEFE, FEFEFEFE, FEFEFEFE, FEFEFEFE] 20 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vspltish.s: -------------------------------------------------------------------------------- 1 | test_vspltish_1: 2 | vspltish v3, 0 3 | blr 4 | #_ REGISTER_OUT v3 [00000000, 00000000, 00000000, 00000000] 5 | 6 | test_vspltish_2: 7 | vspltish v3, 1 8 | blr 9 | #_ REGISTER_OUT v3 [00010001, 00010001, 00010001, 00010001] 10 | 11 | test_vspltish_3: 12 | vspltish v3, -1 13 | blr 14 | #_ REGISTER_OUT v3 [FFFFFFFF, FFFFFFFF, FFFFFFFF, FFFFFFFF] 15 | 16 | test_vspltish_4: 17 | vspltish v3, -2 18 | blr 19 | #_ REGISTER_OUT v3 [FFFEFFFE, FFFEFFFE, FFFEFFFE, FFFEFFFE] 20 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vspltisw.s: -------------------------------------------------------------------------------- 1 | test_vspltisw_1: 2 | vspltisw v3, 0 3 | blr 4 | #_ REGISTER_OUT v3 [00000000, 00000000, 00000000, 00000000] 5 | 6 | test_vspltisw_2: 7 | vspltisw v3, 1 8 | blr 9 | #_ REGISTER_OUT v3 [00000001, 00000001, 00000001, 00000001] 10 | 11 | test_vspltisw_3: 12 | vspltisw v3, -1 13 | blr 14 | #_ REGISTER_OUT v3 [FFFFFFFF, FFFFFFFF, FFFFFFFF, FFFFFFFF] 15 | 16 | test_vspltisw_4: 17 | vspltisw v3, -2 18 | blr 19 | #_ REGISTER_OUT v3 [FFFFFFFE, FFFFFFFE, FFFFFFFE, FFFFFFFE] 20 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vspltw.s: -------------------------------------------------------------------------------- 1 | test_vspltw_1: 2 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 3 | vspltw v3, v4, 0 4 | blr 5 | #_ REGISTER_OUT v3 [00010203, 00010203, 00010203, 00010203] 6 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 7 | 8 | test_vspltw_2: 9 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 10 | vspltw v3, v4, 1 11 | blr 12 | #_ REGISTER_OUT v3 [04050607, 04050607, 04050607, 04050607] 13 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 14 | 15 | test_vspltw_3: 16 | #_ REGISTER_IN v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 17 | vspltw v3, v4, 3 18 | blr 19 | #_ REGISTER_OUT v3 [0C0D0E0F, 0C0D0E0F, 0C0D0E0F, 0C0D0E0F] 20 | #_ REGISTER_OUT v4 [00010203, 04050607, 08090A0B, 0C0D0E0F] 21 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vsrah.s: -------------------------------------------------------------------------------- 1 | test_vsrah_1: 2 | #_ REGISTER_IN v3 [12345678, 87654321, 11223344, 55667788] 3 | #_ REGISTER_IN v4 [000D000D, 000D000D, 000D000D, 000D000D] 4 | vsrah v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [12345678, 87654321, 11223344, 55667788] 7 | #_ REGISTER_OUT v4 [000D000D, 000D000D, 000D000D, 000D000D] 8 | #_ REGISTER_OUT v5 [00000002, FFFC0002, 00000001, 00020003] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vsrh.s: -------------------------------------------------------------------------------- 1 | test_vsrh_1: 2 | #_ REGISTER_IN v3 [12345678, 87654321, 11223344, 55667788] 3 | #_ REGISTER_IN v4 [000D000D, 000D000D, 000D000D, 000D000D] 4 | vsrh v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [12345678, 87654321, 11223344, 55667788] 7 | #_ REGISTER_OUT v4 [000D000D, 000D000D, 000D000D, 000D000D] 8 | #_ REGISTER_OUT v5 [00000002, 00040002, 00000001, 00020003] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vsubfp.s: -------------------------------------------------------------------------------- 1 | test_vsubfp_1: 2 | # v3 = [10.0, -10.0, 15.0, -15.0] 3 | # v4 = [-10.0, 20.0, -20.0, 30.0] 4 | #_ REGISTER_IN v3 [41200000, C1200000, 41700000, C1700000] 5 | #_ REGISTER_IN v4 [C1200000, 41A00000, C1A00000, 41F00000] 6 | vsubfp v3, v3, v4 7 | blr 8 | #_ REGISTER_OUT v3 [41A00000, C1F00000, 420C0000, C2340000] 9 | #_ REGISTER_OUT v4 [C1200000, 41A00000, C1A00000, 41F00000] 10 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vsubfp128.s: -------------------------------------------------------------------------------- 1 | test_vsubfp128_1: 2 | # v3 = [10.0, -10.0, 15.0, -15.0] 3 | # v4 = [-10.0, 20.0, -20.0, 30.0] 4 | #_ REGISTER_IN v3 [41200000, C1200000, 41700000, C1700000] 5 | #_ REGISTER_IN v4 [C1200000, 41A00000, C1A00000, 41F00000] 6 | vsubfp128 v0, v3, v4 7 | blr 8 | #_ REGISTER_OUT v0 [41A00000, C1F00000, 420C0000, C2340000] 9 | #_ REGISTER_OUT v3 [41200000, C1200000, 41700000, C1700000] 10 | #_ REGISTER_OUT v4 [C1200000, 41A00000, C1A00000, 41F00000] 11 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vsubshs.s: -------------------------------------------------------------------------------- 1 | test_vsubshs_1: 2 | #_ REGISTER_IN v3 [7FFF8001, 7FFF8003, 7FFF8005, 80068007] 3 | #_ REGISTER_IN v4 [00018001, 10000000, 42568124, 00000000] 4 | vsubshs v3, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [7ffe0000, 6fff8003, 3da9fee1, 80068007] 7 | #_ REGISTER_OUT v4 [00018001, 10000000, 42568124, 00000000] 8 | 9 | test_vsubshs_2: 10 | #_ REGISTER_IN v3 [7FFF8002, 7FFF8003, 7FFF8005, 80068007] 11 | #_ REGISTER_IN v4 [FFFF0005, 10000000, 42568124, 00000000] 12 | vsubshs v3, v3, v4 13 | blr 14 | #_ REGISTER_OUT v3 [7FFF8000, 6FFF8003, 3DA9FEE1, 80068007] 15 | #_ REGISTER_OUT v4 [FFFF0005, 10000000, 42568124, 00000000] 16 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vsubuhm.s: -------------------------------------------------------------------------------- 1 | test_vsubuhm_1: 2 | #_ REGISTER_IN v3 [7FFF8001, 7FFF8003, 7FFF8005, 80068007] 3 | #_ REGISTER_IN v4 [00018001, 10000000, 42568124, 00000000] 4 | vsubuhm v3, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [7ffe0000, 6fff8003, 3da9fee1, 80068007] 7 | #_ REGISTER_OUT v4 [00018001, 10000000, 42568124, 00000000] 8 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vupkhsb.s: -------------------------------------------------------------------------------- 1 | test_vupkhsb_1: 2 | # {-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7} 3 | #_ REGISTER_IN v3 [F8F9FAFB, FCFDFEFF, 00010203, 04050607] 4 | vupkhsb v3, v3 5 | blr 6 | # {-8, -7, -6, -5, -4, -3, -2, -1} 7 | #_ REGISTER_OUT v3 [FFF8FFF9, FFFAFFFB, FFFCFFFD, FFFEFFFF] 8 | 9 | test_vupkhsb_2: 10 | # {0, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 255, 255, 255, 0, 255} 11 | #_ REGISTER_IN v3 [00FFFF00, 0000FF00, FF0000FF, FFFF00FF] 12 | vupkhsb v3, v3 13 | blr 14 | # {0, 65535, 65535, 0, 0, 0, 65535, 0} 15 | #_ REGISTER_OUT v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] 16 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vupkhsb128.s: -------------------------------------------------------------------------------- 1 | test_vupkhsb128_1: 2 | # {-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7} 3 | #_ REGISTER_IN v3 [F8F9FAFB, FCFDFEFF, 00010203, 04050607] 4 | vupkhsb128 v3, v3 5 | blr 6 | # {-8, -7, -6, -5, -4, -3, -2, -1} 7 | #_ REGISTER_OUT v3 [FFF8FFF9, FFFAFFFB, FFFCFFFD, FFFEFFFF] 8 | 9 | test_vupkhsb128_2: 10 | # {0, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 255, 255, 255, 0, 255} 11 | #_ REGISTER_IN v3 [00FFFF00, 0000FF00, FF0000FF, FFFF00FF] 12 | vupkhsb128 v3, v3 13 | blr 14 | # {0, 65535, 65535, 0, 0, 0, 65535, 0} 15 | #_ REGISTER_OUT v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] 16 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vupkhsh.s: -------------------------------------------------------------------------------- 1 | test_vupkhsh_1: 2 | #_ REGISTER_IN v3 [00010203, 04050607, 08090A0B, 0C0D0E0F] 3 | vupkhsh v3, v3 4 | blr 5 | #_ REGISTER_OUT v3 [00000001, 00000203, 00000405, 00000607] 6 | 7 | test_vupkhsh_2: 8 | #_ REGISTER_IN v3 [7F800203, 04050607, 7F800A0B, 0C0D0E0F] 9 | vupkhsh v3, v3 10 | blr 11 | #_ REGISTER_OUT v3 [00007f80, 00000203, 00000405, 00000607] 12 | 13 | test_vupkhsh_3: 14 | # {0, 65535, 65535, 0, 0, 0, 65535, 0} 15 | #_ REGISTER_IN v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] 16 | vupkhsh v3, v3 17 | blr 18 | # {0, 4294967295, 4294967295, 0} 19 | #_ REGISTER_OUT v3 [00000000, FFFFFFFF, FFFFFFFF, 00000000] 20 | 21 | test_vupkhsh_4: 22 | # {-4, -3, -2, -1, 0, 1, 2, 3} 23 | #_ REGISTER_IN v3 [FFFCFFFD, FFFEFFFF, 00000001, 00020003] 24 | vupkhsh v3, v3 25 | blr 26 | # {-4, -3, -2, -1} 27 | #_ REGISTER_OUT v3 [FFFFFFFC, FFFFFFFD, FFFFFFFE, FFFFFFFF] 28 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vupklsb.s: -------------------------------------------------------------------------------- 1 | test_vupklsb_1: 2 | # {-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7} 3 | #_ REGISTER_IN v3 [F8F9FAFB, FCFDFEFF, 00010203, 04050607] 4 | vupklsb v3, v3 5 | blr 6 | # {0, 1, 2, 3, 4, 5, 6, 7} 7 | #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] 8 | 9 | test_vupklsb_2: 10 | # {0, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 255, 255, 255, 0, 255} 11 | #_ REGISTER_IN v3 [00FFFF00, 0000FF00, FF0000FF, FFFF00FF] 12 | vupklsb v3, v3 13 | blr 14 | # {65535, 0, 0, 65535, 65535, 65535, 0, 65535} 15 | #_ REGISTER_OUT v3 [FFFF0000, 0000FFFF, FFFFFFFF, 0000FFFF] 16 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vupklsb128.s: -------------------------------------------------------------------------------- 1 | test_vupklsb128_1: 2 | # {-8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7} 3 | #_ REGISTER_IN v3 [F8F9FAFB, FCFDFEFF, 00010203, 04050607] 4 | vupklsb128 v3, v3 5 | blr 6 | # {0, 1, 2, 3, 4, 5, 6, 7} 7 | #_ REGISTER_OUT v3 [00000001, 00020003, 00040005, 00060007] 8 | 9 | test_vupklsb128_2: 10 | # {0, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 255, 255, 255, 0, 255} 11 | #_ REGISTER_IN v3 [00FFFF00, 0000FF00, FF0000FF, FFFF00FF] 12 | vupklsb128 v3, v3 13 | blr 14 | # {65535, 0, 0, 65535, 65535, 65535, 0, 65535} 15 | #_ REGISTER_OUT v3 [FFFF0000, 0000FFFF, FFFFFFFF, 0000FFFF] 16 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vupklsh.s: -------------------------------------------------------------------------------- 1 | test_vupklsh_1: 2 | #_ REGISTER_IN v3 [00010203, 04050607, 08090A0B, 0C0D0E0F] 3 | vupklsh v3, v3 4 | blr 5 | #_ REGISTER_OUT v3 [00000809, 00000a0b, 00000c0d, 00000e0f] 6 | 7 | test_vupklsh_2: 8 | #_ REGISTER_IN v3 [7F800203, 04050607, 7F800A0B, 0C0D0E0F] 9 | vupklsh v3, v3 10 | blr 11 | #_ REGISTER_OUT v3 [00007f80, 00000a0b, 00000c0d, 00000e0f] 12 | 13 | test_vupklsh_3: 14 | # {-4, -3, -2, -1, 0, 1, 2, 3} 15 | #_ REGISTER_IN v3 [FFFCFFFD, FFFEFFFF, 00000001, 00020003] 16 | vupklsh v3, v3 17 | blr 18 | # {-4, -3, -2, -1} 19 | #_ REGISTER_OUT v3 [00000000, 00000001, 00000002, 00000003] 20 | 21 | test_vupklsh_4: 22 | # {0, 65535, 65535, 0, 0, 0, 65535, 0} 23 | #_ REGISTER_IN v3 [0000FFFF, FFFF0000, 00000000, FFFF0000] 24 | vupklsh v3, v3 25 | blr 26 | # {0, 0, 4294967295, 0} 27 | #_ REGISTER_OUT v3 [00000000, 00000000, FFFFFFFF, 00000000] 28 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vxor.s: -------------------------------------------------------------------------------- 1 | test_vxor_1: 2 | #_ REGISTER_IN v3 [FFFF0101, 7070FFFF, FFFFFFFF, 00000000] 3 | #_ REGISTER_IN v4 [80081010, 808F0000, 7FFFFFFF, 8FFFFFFF] 4 | vxor v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [FFFF0101, 7070FFFF, FFFFFFFF, 00000000] 7 | #_ REGISTER_OUT v4 [80081010, 808F0000, 7FFFFFFF, 8FFFFFFF] 8 | #_ REGISTER_OUT v5 [7FF71111, F0FFFFFF, 80000000, 8FFFFFFF] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/instr_vxor128.s: -------------------------------------------------------------------------------- 1 | test_vxor128_1: 2 | #_ REGISTER_IN v3 [FFFF0101, 7070FFFF, FFFFFFFF, 00000000] 3 | #_ REGISTER_IN v4 [80081010, 808F0000, 7FFFFFFF, 8FFFFFFF] 4 | vxor128 v5, v3, v4 5 | blr 6 | #_ REGISTER_OUT v3 [FFFF0101, 7070FFFF, FFFFFFFF, 00000000] 7 | #_ REGISTER_OUT v4 [80081010, 808F0000, 7FFFFFFF, 8FFFFFFF] 8 | #_ REGISTER_OUT v5 [7FF71111, F0FFFFFF, 80000000, 8FFFFFFF] 9 | -------------------------------------------------------------------------------- /src/xenia/cpu/ppc/testing/seq_jumptable_constants.s: -------------------------------------------------------------------------------- 1 | the_function: 2 | cmpwi cr6, r3, 3 3 | bgt .case_3 4 | lis r11, .the_table@h 5 | addi r11, r11, .the_table@l 6 | slwi r3, r3, 2 7 | lwzx r3, r11, r3 8 | mtspr ctr, r3 9 | bctr 10 | .the_table: 11 | .long .case_0 12 | .long .case_1 13 | .long .case_2 14 | .long .case_3 15 | .case_0: 16 | li r11, 8 17 | b .the_divide 18 | .case_1: 19 | li r11, 16 20 | b .the_divide 21 | .case_2: 22 | li r11, 24 23 | b .the_divide 24 | .case_3: 25 | li r11, 32 26 | .the_divide: 27 | extsw r11, r11 28 | tdllei r11, 0 29 | divdu r4, r4, r11 30 | blr 31 | 32 | test_jumptable_constants: 33 | mfspr r12, lr 34 | li r3, 0 35 | li r4, 1024 36 | bl the_function 37 | li r3, 1 38 | li r4, 1024 39 | bl the_function 40 | li r3, 2 41 | li r4, 1024 42 | bl the_function 43 | li r3, 3 44 | li r4, 1024 45 | bl the_function 46 | mtspr lr, r12 47 | blr 48 | -------------------------------------------------------------------------------- /src/xenia/cpu/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-cpu") 6 | uuid("0109c91e-5a04-41ab-9168-0d5187d11298") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "mspack", 12 | }) 13 | 14 | includedirs({ 15 | project_root.."/third_party/llvm/include", 16 | }) 17 | local_platform_files() 18 | local_platform_files("backend") 19 | local_platform_files("compiler") 20 | local_platform_files("compiler/passes") 21 | local_platform_files("hir") 22 | local_platform_files("ppc") 23 | 24 | if enableTests then 25 | include("testing") 26 | include("ppc/testing") 27 | end 28 | -------------------------------------------------------------------------------- /src/xenia/cpu/stack_walker_posix.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2017 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/cpu/stack_walker.h" 11 | 12 | #include "xenia/base/logging.h" 13 | 14 | namespace xe { 15 | namespace cpu { 16 | 17 | std::unique_ptr StackWalker::Create( 18 | backend::CodeCache* code_cache) { 19 | XELOGD("Stack walker unimplemented on posix"); 20 | return nullptr; 21 | } 22 | 23 | } // namespace cpu 24 | } // namespace xe -------------------------------------------------------------------------------- /src/xenia/cpu/testing/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | test_suite("xenia-cpu-tests", project_root, ".", { 5 | links = { 6 | "capstone", 7 | "fmt", 8 | "imgui", 9 | "xenia-base", 10 | "xenia-core", 11 | "xenia-cpu", 12 | "xenia-gpu", 13 | "xenia-hid-skylander", 14 | 15 | -- TODO(benvanik): cut these dependencies? 16 | "xenia-kernel", 17 | "xenia-ui", -- needed by xenia-base 18 | "xenia-patcher", 19 | }, 20 | filtered_links = { 21 | { 22 | filter = 'architecture:x86_64', 23 | links = { 24 | "xenia-cpu-backend-x64", 25 | }, 26 | } 27 | }, 28 | }) 29 | -------------------------------------------------------------------------------- /src/xenia/debug/ui/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-debug-ui") 6 | uuid("9193a274-f4c2-4746-bd85-93fcfc5c3e38") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "imgui", 11 | "xenia-base", 12 | "xenia-cpu", 13 | "xenia-ui", 14 | }) 15 | -- filter({"configurations:Release", "platforms:Windows"}) 16 | -- buildoptions({ 17 | -- "/O1", 18 | -- }) 19 | -- filter{} 20 | defines({ 21 | }) 22 | includedirs({ 23 | }) 24 | local_platform_files() 25 | -------------------------------------------------------------------------------- /src/xenia/gpu/null/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-gpu-null") 6 | uuid("42FCA0B3-4C20-4532-95E9-07D297013BE4") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "xenia-gpu", 12 | "xenia-ui", 13 | "xenia-ui-vulkan", 14 | "xxhash", 15 | }) 16 | includedirs({ 17 | project_root.."/third_party/Vulkan-Headers/include", 18 | }) 19 | local_platform_files() 20 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/apply_gamma_pwl.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_APPLY_GAMMA_COMPUTE 11 | #include "apply_gamma_pwl.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/apply_gamma_pwl.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "apply_gamma_pwl.xesli" 11 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/apply_gamma_pwl_fxaa_luma.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_APPLY_GAMMA_FXAA_LUMA 11 | #define XE_APPLY_GAMMA_COMPUTE 12 | #include "apply_gamma_pwl.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/apply_gamma_pwl_fxaa_luma.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_APPLY_GAMMA_FXAA_LUMA 11 | #include "apply_gamma_pwl.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/apply_gamma_table.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_APPLY_GAMMA_COMPUTE 11 | #include "apply_gamma_table.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/apply_gamma_table.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "apply_gamma_table.xesli" 11 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/apply_gamma_table_fxaa_luma.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_APPLY_GAMMA_FXAA_LUMA 11 | #define XE_APPLY_GAMMA_COMPUTE 12 | #include "apply_gamma_table.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/apply_gamma_table_fxaa_luma.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_APPLY_GAMMA_FXAA_LUMA 11 | #include "apply_gamma_table.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/bytecode/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: false 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/clear_uint2.ps.hlsl: -------------------------------------------------------------------------------- 1 | cbuffer XeClearConstants : register(b0) { 2 | uint2 xe_clear_value; 3 | }; 4 | 5 | uint2 main() : SV_Target { 6 | return xe_clear_value; 7 | } 8 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/continuous_quad_1cp.hs.hlsl: -------------------------------------------------------------------------------- 1 | #define XE_TESSELLATION_CONTROL_POINT_COUNT 1 2 | #include "continuous_quad.hlsli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/continuous_quad_4cp.hs.hlsl: -------------------------------------------------------------------------------- 1 | #define XE_TESSELLATION_CONTROL_POINT_COUNT 4 2 | #include "continuous_quad.hlsli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/continuous_triangle_1cp.hs.hlsl: -------------------------------------------------------------------------------- 1 | #define XE_TESSELLATION_CONTROL_POINT_COUNT 1 2 | #include "continuous_triangle.hlsli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/continuous_triangle_3cp.hs.hlsl: -------------------------------------------------------------------------------- 1 | #define XE_TESSELLATION_CONTROL_POINT_COUNT 3 2 | #include "continuous_triangle.hlsli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/discrete_quad_1cp.hs.hlsl: -------------------------------------------------------------------------------- 1 | #define XE_TESSELLATION_CONTROL_POINT_COUNT 1 2 | #include "discrete_quad.hlsli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/discrete_quad_4cp.hs.hlsl: -------------------------------------------------------------------------------- 1 | #define XE_TESSELLATION_CONTROL_POINT_COUNT 4 2 | #include "discrete_quad.hlsli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/discrete_triangle_1cp.hs.hlsl: -------------------------------------------------------------------------------- 1 | #define XE_TESSELLATION_CONTROL_POINT_COUNT 1 2 | #include "discrete_triangle.hlsli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/discrete_triangle_3cp.hs.hlsl: -------------------------------------------------------------------------------- 1 | #define XE_TESSELLATION_CONTROL_POINT_COUNT 3 2 | #include "discrete_triangle.hlsli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/float24_round.ps.hlsl: -------------------------------------------------------------------------------- 1 | #include "pixel_formats.xesli" 2 | #include "xenos_draw.hlsli" 3 | 4 | struct XePSInput { 5 | XeVertexPrePS pre_ps; 6 | sample float4 position : SV_Position; 7 | }; 8 | 9 | precise float main(XePSInput xe_input) : SV_Depth { 10 | // Input Z may be outside the viewport range (it's clamped after the shader). 11 | // Assuming that 0...0.5 on the host corresponds to 0...1 on the guest, to 12 | // allow for safe reinterpretation of any 24-bit value to and from float24 13 | // depth using depth output without unrestricted depth range. 14 | return asfloat(XeFloat20e4To32( 15 | XeFloat32To20e4(asuint(saturate(xe_input.position.z * 2.0f)), true), 16 | true)); 17 | } 18 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/fxaa.cs.hlsl: -------------------------------------------------------------------------------- 1 | #define FXAA_QUALITY__PRESET 12 2 | #define FXAA_QUALITY__SUBPIX 0.75 3 | #define FXAA_QUALITY__EDGE_THRESHOLD 0.166 4 | #define FXAA_QUALITY__EDGE_THRESHOLD_MIN 0.0833 5 | #include "fxaa.hlsli" 6 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/fxaa_extreme.cs.hlsl: -------------------------------------------------------------------------------- 1 | #define FXAA_QUALITY__PRESET 39 2 | #define FXAA_QUALITY__SUBPIX 1.0 3 | #define FXAA_QUALITY__EDGE_THRESHOLD 0.063 4 | #define FXAA_QUALITY__EDGE_THRESHOLD_MIN 0.0312 5 | #include "fxaa.hlsli" 6 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/passthrough_position_xy.vs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "../../ui/shaders/xesl.xesli" 11 | 12 | xesl_entry_outputs_begin 13 | xesl_entry_output_position 14 | xesl_entry_outputs_end_stageInputs_begin 15 | xesl_entry_stageInput_vertex(xesl_float2, xe_in_position, 0, POSITION) 16 | xesl_entry_stageInputs_end_bindings_begin_vertex 17 | xesl_entry_bindings_empty_end_inputs_begin 18 | xesl_entry_input_stageInputs 19 | xesl_entry_inputs_end_code_begin 20 | xesl_Position = xesl_float4(xesl_StageInput(xe_in_position), 0.0, 1.0); 21 | xesl_entry_code_end 22 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_clear_32bpp.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_clear_32bpp.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_clear_32bpp_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_clear_32bpp.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_clear_64bpp.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_clear_64bpp.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_clear_64bpp_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_clear_64bpp.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_fast_32bpp_1x2xmsaa.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_fast_32bpp_1x2xmsaa.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_fast_32bpp_1x2xmsaa_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_fast_32bpp_1x2xmsaa.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_fast_32bpp_4xmsaa.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_fast_32bpp_4xmsaa.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_fast_32bpp_4xmsaa_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_fast_32bpp_4xmsaa.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_fast_64bpp_1x2xmsaa.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_fast_64bpp_1x2xmsaa.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_fast_64bpp_1x2xmsaa_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_fast_64bpp_1x2xmsaa.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_fast_64bpp_4xmsaa.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_fast_64bpp_4xmsaa.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_fast_64bpp_4xmsaa_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_fast_64bpp_4xmsaa.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_128bpp.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_full_128bpp.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_128bpp_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_full_128bpp.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_16bpp.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_full_16bpp.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_16bpp_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_full_16bpp.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_32bpp.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_full_32bpp.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_32bpp_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_full_32bpp.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_64bpp.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_full_64bpp.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_64bpp_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_full_64bpp.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_8bpp.cs.xesl: -------------------------------------------------------------------------------- 1 | #include "resolve_full_8bpp.xesli" 2 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/resolve_full_8bpp_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | #define XE_RESOLVE_RESOLUTION_SCALED 2 | #include "resolve_full_8bpp.xesli" 3 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/tessellation_adaptive.vs.hlsl: -------------------------------------------------------------------------------- 1 | #include "endian.xesli" 2 | #include "xenos_draw.hlsli" 3 | 4 | XeHSControlPointInputAdaptive main(uint xe_edge_factor : SV_VertexID) { 5 | XeHSControlPointInputAdaptive output; 6 | // The Xbox 360's GPU accepts the float32 tessellation factors for edges 7 | // through a special kind of an index buffer. 8 | // While 4D5307F2 sets the factors to 0 for frustum-culled (quad) patches, in 9 | // 4D5307E6 only allowing patches with factors above 0 makes distant 10 | // (triangle) patches disappear - it appears that there are no special values 11 | // for culled patches on the Xbox 360 (unlike zero, negative and NaN on 12 | // Direct3D 11). 13 | output.edge_factor = clamp( 14 | asfloat(XeEndianSwap32(xe_edge_factor, xe_vertex_index_endian)) + 1.0f, 15 | xe_tessellation_factor_range.x, xe_tessellation_factor_range.y); 16 | return output; 17 | } 18 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/tessellation_indexed.vs.hlsl: -------------------------------------------------------------------------------- 1 | #include "endian.xesli" 2 | #include "xenos_draw.hlsli" 3 | 4 | XeHSControlPointInputIndexed main(uint xe_vertex_id : SV_VertexID) { 5 | XeHSControlPointInputIndexed output; 6 | // Only the lower 24 bits of the vertex index are used (tested on an Adreno 7 | // 200 phone). `((index & 0xFFFFFF) + offset) & 0xFFFFFF` is the same as 8 | // `(index + offset) & 0xFFFFFF`. 9 | output.index = 10 | float(clamp((XeEndianSwap32(xe_vertex_id, xe_vertex_index_endian) + 11 | xe_vertex_index_offset) & 12 | 0xFFFFFFu, 13 | xe_vertex_index_min_max.x, xe_vertex_index_min_max.y)); 14 | return output; 15 | } 16 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_128bpb.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "texture_load_128bpb.xesli" 11 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_128bpb_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "texture_load_128bpb.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_16bpb.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM(blocks) (blocks) 11 | #include "texture_load_16bpb.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_16bpb_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM(blocks) (blocks) 12 | #include "texture_load_16bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_32bpb.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM(blocks) (blocks) 11 | #include "texture_load_32bpb.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_32bpb_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM(blocks) (blocks) 12 | #include "texture_load_32bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_64bpb.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_64BPB_TRANSFORM(blocks) (blocks) 11 | #include "texture_load_64bpb.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_64bpb_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #define XE_TEXTURE_LOAD_64BPB_TRANSFORM(blocks) (blocks) 12 | #include "texture_load_64bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_8bpb.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "texture_load_8bpb.xesli" 11 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_8bpb_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "texture_load_8bpb.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_bgrg8_rgb8.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeBGRG8ToRGB8WithRGBBSwizzle 12 | #include "texture_load_32bpb_64bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_bgrg8_rgbg8.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM XeBGRG8ToRGBG8 12 | #include "texture_load_32bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_depth_float.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM(blocks) \ 12 | (XeFloat20e4To32((blocks) >> 8u)) 13 | #include "texture_load_32bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_depth_float_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM(blocks) \ 13 | (XeFloat20e4To32((blocks) >> 8u)) 14 | #include "texture_load_32bpb.xesli" 15 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_depth_unorm.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM(blocks) \ 12 | (xesl_floatBitsToUint(XeUNorm24To32((blocks) >> 8u))) 13 | #include "texture_load_32bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_depth_unorm_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM(blocks) \ 13 | (xesl_floatBitsToUint(XeUNorm24To32((blocks) >> 8u))) 14 | #include "texture_load_32bpb.xesli" 15 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_dxt3aas1111_argb4.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP \ 12 | XeDXT3AAs1111TwoBlocksRowToARGB4 13 | #include "texture_load_dxt3aas1111.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_dxt3aas1111_bgra4.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_DXT3A_AS_1_1_1_1_TO_16BPP \ 12 | XeDXT3AAs1111TwoBlocksRowToBGRA4 13 | #include "texture_load_dxt3aas1111.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_gbgr8_grgb8.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM XeGBGR8ToGRGB8 12 | #include "texture_load_32bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_gbgr8_rgb8.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeGBGR8ToRGB8WithRGBBSwizzle 12 | #include "texture_load_32bpb_64bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r10g11b11_rgba16.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeR10G11B11UNormToRGBA16 12 | #include "texture_load_32bpb_64bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r10g11b11_rgba16_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeR10G11B11UNormToRGBA16 13 | #include "texture_load_32bpb_64bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r10g11b11_rgba16_snorm.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeR10G11B11SNormToRGBA16 12 | #include "texture_load_32bpb_64bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r10g11b11_rgba16_snorm_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeR10G11B11SNormToRGBA16 13 | #include "texture_load_32bpb_64bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r11g11b10_rgba16.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeR11G11B10UNormToRGBA16 12 | #include "texture_load_32bpb_64bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r11g11b10_rgba16_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeR11G11B10UNormToRGBA16 13 | #include "texture_load_32bpb_64bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r11g11b10_rgba16_snorm.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeR11G11B10SNormToRGBA16 12 | #include "texture_load_32bpb_64bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r11g11b10_rgba16_snorm_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_32BPB_TO_64BPB XeR11G11B10SNormToRGBA16 13 | #include "texture_load_32bpb_64bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r16_snorm_float.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeRG16SNormToRG16Float 12 | #include "texture_load_16bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r16_snorm_float_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeRG16SNormToRG16Float 13 | #include "texture_load_16bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r16_unorm_float.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeRG16UNormToRG16Float 12 | #include "texture_load_16bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r16_unorm_float_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeRG16UNormToRG16Float 13 | #include "texture_load_16bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r4g4b4a4_a4r4g4b4.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR4G4B4A4ToA4R4G4B4 12 | #include "texture_load_16bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r4g4b4a4_a4r4g4b4_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR4G4B4A4ToA4R4G4B4 13 | #include "texture_load_16bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r4g4b4a4_b4g4r4a4.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR4G4B4A4ToB4G4R4A4 12 | #include "texture_load_16bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r4g4b4a4_b4g4r4a4_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR4G4B4A4ToB4G4R4A4 13 | #include "texture_load_16bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r5g5b5a1_b5g5r5a1.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR5G5B5A1ToB5G5R5A1 12 | #include "texture_load_16bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r5g5b5a1_b5g5r5a1_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR5G5B5A1ToB5G5R5A1 13 | #include "texture_load_16bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r5g5b6_b5g6r5_swizzle_rbga.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR5G5B6ToB5G6R5WithRBGASwizzle 12 | #include "texture_load_16bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r5g5b6_b5g6r5_swizzle_rbga_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR5G5B6ToB5G6R5WithRBGASwizzle 13 | #include "texture_load_16bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r5g6b5_b5g6r5.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR5G6B5ToB5G6R5 12 | #include "texture_load_16bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_r5g6b5_b5g6r5_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_16BPB_TRANSFORM XeR5G6B5ToB5G6R5 13 | #include "texture_load_16bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_rg16_snorm_float.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM XeRG16SNormToRG16Float 12 | #include "texture_load_32bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_rg16_snorm_float_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM XeRG16SNormToRG16Float 13 | #include "texture_load_32bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_rg16_unorm_float.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM XeRG16UNormToRG16Float 12 | #include "texture_load_32bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_rg16_unorm_float_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_32BPB_TRANSFORM XeRG16UNormToRG16Float 13 | #include "texture_load_32bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_rgba16_snorm_float.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_64BPB_TRANSFORM XeRG16SNormToRG16Float 12 | #include "texture_load_64bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_rgba16_snorm_float_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_64BPB_TRANSFORM XeRG16SNormToRG16Float 13 | #include "texture_load_64bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_rgba16_unorm_float.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "pixel_formats.xesli" 11 | #define XE_TEXTURE_LOAD_64BPB_TRANSFORM XeRG16UNormToRG16Float 12 | #include "texture_load_64bpb.xesli" 13 | -------------------------------------------------------------------------------- /src/xenia/gpu/shaders/texture_load_rgba16_unorm_float_scaled.cs.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_TEXTURE_LOAD_RESOLUTION_SCALED 11 | #include "pixel_formats.xesli" 12 | #define XE_TEXTURE_LOAD_64BPB_TRANSFORM XeRG16UNormToRG16Float 13 | #include "texture_load_64bpb.xesli" 14 | -------------------------------------------------------------------------------- /src/xenia/helper/sdl/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-helper-sdl") 6 | uuid("84b00ad3-fba3-4561-96c9-1f9993b14c9c") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "SDL2", 11 | }) 12 | defines({ 13 | }) 14 | includedirs({ 15 | }) 16 | local_platform_files() 17 | sdl2_include() 18 | -------------------------------------------------------------------------------- /src/xenia/hid/hid_flags.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/hid/hid_flags.h" 11 | 12 | DEFINE_bool(guide_button, true, "Forward guide button presses to guest.", 13 | "HID"); 14 | -------------------------------------------------------------------------------- /src/xenia/hid/hid_flags.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_HID_HID_FLAGS_H_ 11 | #define XENIA_HID_HID_FLAGS_H_ 12 | 13 | #include "xenia/base/cvar.h" 14 | 15 | DECLARE_bool(guide_button); 16 | 17 | #endif // XENIA_HID_HID_FLAGS_H_ 18 | -------------------------------------------------------------------------------- /src/xenia/hid/nop/nop_hid.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/hid/nop/nop_hid.h" 11 | 12 | #include "xenia/hid/nop/nop_input_driver.h" 13 | 14 | namespace xe { 15 | namespace hid { 16 | namespace nop { 17 | 18 | std::unique_ptr Create(xe::ui::Window* window, 19 | size_t window_z_order) { 20 | return std::make_unique(window, window_z_order); 21 | } 22 | 23 | } // namespace nop 24 | } // namespace hid 25 | } // namespace xe 26 | -------------------------------------------------------------------------------- /src/xenia/hid/nop/nop_hid.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_HID_NOP_NOP_HID_H_ 11 | #define XENIA_HID_NOP_NOP_HID_H_ 12 | 13 | #include 14 | 15 | #include "xenia/hid/input_system.h" 16 | 17 | namespace xe { 18 | namespace hid { 19 | namespace nop { 20 | 21 | std::unique_ptr Create(xe::ui::Window* window, 22 | size_t window_z_order); 23 | 24 | } // namespace nop 25 | } // namespace hid 26 | } // namespace xe 27 | 28 | #endif // XENIA_HID_NOP_NOP_HID_H_ 29 | -------------------------------------------------------------------------------- /src/xenia/hid/nop/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-hid-nop") 6 | uuid("887b6f26-b0c1-43c1-a013-a37e7b9634fd") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "xenia-hid", 12 | }) 13 | defines({ 14 | }) 15 | local_platform_files() 16 | -------------------------------------------------------------------------------- /src/xenia/hid/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-hid") 6 | uuid("88a4ef38-c550-430f-8c22-8ded4e4ef601") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "xenia-hid-skylander", 12 | }) 13 | defines({ 14 | }) 15 | local_platform_files() 16 | removefiles({"*_demo.cc"}) 17 | -------------------------------------------------------------------------------- /src/xenia/hid/sdl/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-hid-sdl") 6 | uuid("44f5b9a1-00f8-4825-acf1-5c93f26eba9b") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "xenia-hid", 12 | "xenia-ui", 13 | "SDL2", 14 | }) 15 | defines({ 16 | }) 17 | local_platform_files() 18 | sdl2_include() 19 | -------------------------------------------------------------------------------- /src/xenia/hid/sdl/sdl_hid.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2020 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/hid/sdl/sdl_hid.h" 11 | 12 | #include "xenia/hid/sdl/sdl_input_driver.h" 13 | 14 | namespace xe { 15 | namespace hid { 16 | namespace sdl { 17 | 18 | std::unique_ptr Create(xe::ui::Window* window, 19 | size_t window_z_order) { 20 | return std::make_unique(window, window_z_order); 21 | } 22 | 23 | } // namespace sdl 24 | } // namespace hid 25 | } // namespace xe 26 | -------------------------------------------------------------------------------- /src/xenia/hid/sdl/sdl_hid.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2020 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_HID_SDL_SDL_HID_H_ 11 | #define XENIA_HID_SDL_SDL_HID_H_ 12 | 13 | #include 14 | 15 | #include "xenia/hid/input_system.h" 16 | 17 | namespace xe { 18 | namespace hid { 19 | namespace sdl { 20 | 21 | std::unique_ptr Create(xe::ui::Window* window, 22 | size_t window_z_order); 23 | 24 | } // namespace sdl 25 | } // namespace hid 26 | } // namespace xe 27 | 28 | #endif // XENIA_HID_SDL_SDL_HID_H_ 29 | -------------------------------------------------------------------------------- /src/xenia/hid/skylander/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-hid-skylander") 6 | uuid("ddc114da-a279-4868-8b20-53108599bd78") 7 | kind("StaticLib") 8 | language("C++") 9 | files({ 10 | "skylander_portal.h", 11 | "skylander_portal.cc", 12 | "skylander_emulated.h", 13 | "skylander_emulated.cc" 14 | }) 15 | 16 | filter({"platforms:Windows"}) 17 | links({ 18 | "libusb", 19 | }) 20 | files({ 21 | "skylander_hardware.h", 22 | "skylander_hardware.cc" 23 | }) 24 | -------------------------------------------------------------------------------- /src/xenia/hid/skylander/skylander_portal.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2025 Xenia Canary. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/hid/skylander/skylander_portal.h" 11 | 12 | namespace xe { 13 | namespace hid { 14 | 15 | SkylanderPortal::SkylanderPortal() {} 16 | SkylanderPortal::~SkylanderPortal() {} 17 | 18 | } // namespace hid 19 | } // namespace xe -------------------------------------------------------------------------------- /src/xenia/hid/winkey/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-hid-winkey") 6 | uuid("fd16e19a-6219-4ab7-b95a-7c78523c50c3") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "xenia-hid", 12 | "xenia-ui", 13 | }) 14 | defines({ 15 | }) 16 | local_platform_files() 17 | -------------------------------------------------------------------------------- /src/xenia/hid/winkey/winkey_hid.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2014 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/hid/winkey/winkey_hid.h" 11 | 12 | #include "xenia/hid/winkey/winkey_input_driver.h" 13 | 14 | namespace xe { 15 | namespace hid { 16 | namespace winkey { 17 | 18 | std::unique_ptr Create(xe::ui::Window* window, 19 | size_t window_z_order) { 20 | return std::make_unique(window, window_z_order); 21 | } 22 | 23 | } // namespace winkey 24 | } // namespace hid 25 | } // namespace xe 26 | -------------------------------------------------------------------------------- /src/xenia/hid/winkey/winkey_hid.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2014 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_HID_WINKEY_WINKEY_HID_H_ 11 | #define XENIA_HID_WINKEY_WINKEY_HID_H_ 12 | 13 | #include 14 | 15 | #include "xenia/hid/input_system.h" 16 | 17 | namespace xe { 18 | namespace hid { 19 | namespace winkey { 20 | 21 | std::unique_ptr Create(xe::ui::Window* window, 22 | size_t window_z_order); 23 | 24 | } // namespace winkey 25 | } // namespace hid 26 | } // namespace xe 27 | 28 | #endif // XENIA_HID_WINKEY_WINKEY_HID_H_ 29 | -------------------------------------------------------------------------------- /src/xenia/hid/xinput/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-hid-xinput") 6 | uuid("3d49e251-07a7-40ae-9bc6-aae984c85568") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "xenia-hid", 12 | }) 13 | defines({ 14 | }) 15 | local_platform_files() 16 | -------------------------------------------------------------------------------- /src/xenia/hid/xinput/xinput_hid.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/hid/xinput/xinput_hid.h" 11 | 12 | #include "xenia/hid/xinput/xinput_input_driver.h" 13 | 14 | namespace xe { 15 | namespace hid { 16 | namespace xinput { 17 | 18 | std::unique_ptr Create(xe::ui::Window* window, 19 | size_t window_z_order) { 20 | return std::make_unique(window, window_z_order); 21 | } 22 | 23 | } // namespace xinput 24 | } // namespace hid 25 | } // namespace xe 26 | -------------------------------------------------------------------------------- /src/xenia/hid/xinput/xinput_hid.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_HID_XINPUT_XINPUT_HID_H_ 11 | #define XENIA_HID_XINPUT_XINPUT_HID_H_ 12 | 13 | #include 14 | 15 | #include "xenia/hid/input_system.h" 16 | 17 | namespace xe { 18 | namespace hid { 19 | namespace xinput { 20 | 21 | std::unique_ptr Create(xe::ui::Window* window, 22 | size_t window_z_order); 23 | 24 | } // namespace xinput 25 | } // namespace hid 26 | } // namespace xe 27 | 28 | #endif // XENIA_HID_XINPUT_XINPUT_HID_H_ 29 | -------------------------------------------------------------------------------- /src/xenia/kernel/debug_visualizers.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {host_ptr_} 7 | 8 | host_ptr_ 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/xenia/kernel/kernel_flags.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/kernel/kernel_flags.h" 11 | 12 | DEFINE_bool(headless, false, 13 | "Don't display any UI, using defaults for prompts as needed.", 14 | "UI"); 15 | DEFINE_bool(log_high_frequency_kernel_calls, false, 16 | "Log kernel calls with the kHighFrequency tag.", "Kernel"); 17 | -------------------------------------------------------------------------------- /src/xenia/kernel/kernel_flags.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_KERNEL_KERNEL_FLAGS_H_ 11 | #define XENIA_KERNEL_KERNEL_FLAGS_H_ 12 | #include "xenia/base/cvar.h" 13 | 14 | DECLARE_bool(headless); 15 | DECLARE_bool(log_high_frequency_kernel_calls); 16 | 17 | #endif // XENIA_KERNEL_KERNEL_FLAGS_H_ 18 | -------------------------------------------------------------------------------- /src/xenia/kernel/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-kernel") 6 | uuid("ae185c4a-1c4f-4503-9892-328e549e871a") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "aes_128", 11 | "fmt", 12 | "zlib", 13 | "pugixml", 14 | "xenia-apu", 15 | "xenia-base", 16 | "xenia-cpu", 17 | "xenia-hid", 18 | "xenia-vfs", 19 | }) 20 | defines({ 21 | }) 22 | recursive_platform_files() 23 | files({ 24 | "debug_visualizers.natvis", 25 | }) 26 | -------------------------------------------------------------------------------- /src/xenia/kernel/util/export_table_post.inc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2021 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | // Post-include file for an export table. 11 | 12 | #undef FLAG 13 | #undef XE_EXPORT 14 | -------------------------------------------------------------------------------- /src/xenia/kernel/util/kernel_fwd.h: -------------------------------------------------------------------------------- 1 | #ifndef XENIA_KERNEL_UTIL_KERNEL_FWD_H_ 2 | #define XENIA_KERNEL_UTIL_KERNEL_FWD_H_ 3 | 4 | namespace xe::kernel { 5 | class Dispatcher; 6 | class XHostThread; 7 | class KernelModule; 8 | class XModule; 9 | class XNotifyListener; 10 | class XThread; 11 | class UserModule; 12 | struct X_KPROCESS; 13 | struct TerminateNotification; 14 | struct X_TIME_STAMP_BUNDLE; 15 | class KernelState; 16 | struct XAPC; 17 | 18 | struct X_KPCR; 19 | struct X_KTHREAD; 20 | struct X_OBJECT_HEADER; 21 | struct X_OBJECT_CREATE_INFORMATION; 22 | 23 | } // namespace xe::kernel 24 | 25 | namespace xe::kernel::util { 26 | class NativeList; 27 | class ObjectTable; 28 | } // namespace xe::kernel::util 29 | #endif -------------------------------------------------------------------------------- /src/xenia/kernel/util/ordinal_table_post.inc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2021 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | // Post-include file for an ordinal table. 11 | 12 | #undef XE_EXPORT 13 | -------------------------------------------------------------------------------- /src/xenia/kernel/util/shim_utils.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2015 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/kernel/util/shim_utils.h" 11 | #include "xenia/kernel/xthread.h" 12 | namespace xe { 13 | namespace kernel { 14 | namespace shim { 15 | 16 | thread_local StringBuffer string_buffer_; 17 | 18 | StringBuffer* thread_local_string_buffer() { return &string_buffer_; } 19 | 20 | XThread* ContextParam::CurrentXThread() const { 21 | return XThread::GetCurrentThread(); 22 | } 23 | 24 | } // namespace shim 25 | } // namespace kernel 26 | } // namespace xe 27 | -------------------------------------------------------------------------------- /src/xenia/kernel/xam/xam_ordinals.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_KERNEL_XAM_XAM_ORDINALS_H_ 11 | #define XENIA_KERNEL_XAM_XAM_ORDINALS_H_ 12 | 13 | #include "xenia/cpu/export_resolver.h" 14 | 15 | // Build an ordinal enum to make it easy to lookup ordinals. 16 | #include "xenia/kernel/util/ordinal_table_pre.inc" 17 | namespace ordinals { 18 | enum { 19 | #include "xenia/kernel/xam/xam_table.inc" 20 | }; 21 | } // namespace ordinals 22 | #include "xenia/kernel/util/ordinal_table_post.inc" 23 | 24 | #endif // XENIA_KERNEL_XAM_XAM_ORDINALS_H_ 25 | -------------------------------------------------------------------------------- /src/xenia/kernel/xbdm/xbdm_module_export_groups.inc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | // This is a partial file designed to be included by other files when 11 | // constructing various tables. 12 | 13 | XE_MODULE_EXPORT_GROUP(xbdm, Misc) 14 | -------------------------------------------------------------------------------- /src/xenia/kernel/xbdm/xbdm_ordinals.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2013 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_KERNEL_XBDM_XBDM_ORDINALS_H_ 11 | #define XENIA_KERNEL_XBDM_XBDM_ORDINALS_H_ 12 | 13 | #include "xenia/cpu/export_resolver.h" 14 | 15 | // Build an ordinal enum to make it easy to lookup ordinals. 16 | #include "xenia/kernel/util/ordinal_table_pre.inc" 17 | namespace ordinals { 18 | enum { 19 | #include "xenia/kernel/xbdm/xbdm_table.inc" 20 | }; 21 | } // namespace ordinals 22 | #include "xenia/kernel/util/ordinal_table_post.inc" 23 | 24 | #endif // XENIA_KERNEL_XBDM_XBDM_ORDINALS_H_ 25 | -------------------------------------------------------------------------------- /src/xenia/kernel/xboxkrnl/xboxkrnl_error.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2015 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_KERNEL_XBOXKRNL_XBOXKRNL_ERROR_H_ 11 | #define XENIA_KERNEL_XBOXKRNL_XBOXKRNL_ERROR_H_ 12 | 13 | #include "xenia/kernel/util/shim_utils.h" 14 | #include "xenia/xbox.h" 15 | 16 | namespace xe { 17 | namespace kernel { 18 | namespace xboxkrnl { 19 | 20 | uint32_t xeRtlNtStatusToDosError(uint32_t source_status); 21 | 22 | } // namespace xboxkrnl 23 | } // namespace kernel 24 | } // namespace xe 25 | 26 | #endif // XENIA_KERNEL_XBOXKRNL_XBOXKRNL_ERROR_H_ 27 | -------------------------------------------------------------------------------- /src/xenia/kernel/xboxkrnl/xboxkrnl_video.h: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_KERNEL_XBOXKRNL_XBOXKRNL_VIDEO_H_ 11 | #define XENIA_KERNEL_XBOXKRNL_XBOXKRNL_VIDEO_H_ 12 | 13 | #include "xenia/kernel/util/shim_utils.h" 14 | #include "xenia/xbox.h" 15 | 16 | namespace xe { 17 | namespace kernel { 18 | namespace xboxkrnl { 19 | 20 | void VdQueryVideoMode(X_VIDEO_MODE* video_mode); 21 | 22 | } // namespace xboxkrnl 23 | } // namespace kernel 24 | } // namespace xe 25 | 26 | #endif // XENIA_KERNEL_XBOXKRNL_XBOXKRNL_VIDEO_H_ 27 | -------------------------------------------------------------------------------- /src/xenia/patcher/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-patcher") 6 | uuid("e1c75f76-9e7b-48f6-b17e-dbd20f7a1592") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base" 11 | }) 12 | defines({ 13 | }) 14 | recursive_platform_files() 15 | -------------------------------------------------------------------------------- /src/xenia/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-core") 6 | uuid("970f7892-f19a-4bf5-8795-478c51757bec") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "fmt", 11 | "xenia-base", 12 | }) 13 | defines({ 14 | }) 15 | files({"*.h", "*.cc"}) 16 | -------------------------------------------------------------------------------- /src/xenia/tools/api-scanner/README.md: -------------------------------------------------------------------------------- 1 | ## api-scanner 2 | 3 | api-scanner will dump out the API imports from a packaged 360 game 4 | 5 | ### Usage 6 | 7 | Run from the command line 8 | 9 | `api-scanner ` 10 | 11 | or: 12 | 13 | `api-scanner --target ` 14 | 15 | Output is printed to the console window, so it self-managed. 16 | 17 | The suggested usage is to append the output to a local file: 18 | 19 | `api-scanner >> title_log.txt` 20 | 21 | ### Issues 22 | 23 | - Duplicate code for loading containers 24 | - Several issues with gflags library - incorrectly prints usage from other files (due to linkage with libxenia) 25 | -------------------------------------------------------------------------------- /src/xenia/ui/d3d12/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-ui-d3d12") 6 | uuid("f93dc1a8-600f-43e7-b0fc-ae3eefbe836b") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "xenia-ui", 12 | }) 13 | local_platform_files() 14 | files({ 15 | "../shaders/bytecode/d3d12_5_1/*.h", 16 | }) 17 | 18 | if enableMiscSubprojects then 19 | group("demos") 20 | project("xenia-ui-window-d3d12-demo") 21 | uuid("3b9686a7-0f04-4e17-8b00-aeb78ae1107c") 22 | single_library_windowed_app_kind() 23 | language("C++") 24 | links({ 25 | "fmt", 26 | "imgui", 27 | "xenia-base", 28 | "xenia-ui", 29 | "xenia-ui-d3d12", 30 | }) 31 | files({ 32 | "../window_demo.cc", 33 | "d3d12_window_demo.cc", 34 | project_root.."/src/xenia/ui/windowed_app_main_"..platform_suffix..".cc", 35 | }) 36 | resincludedirs({ 37 | project_root, 38 | }) 39 | end -------------------------------------------------------------------------------- /src/xenia/ui/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-ui") 6 | uuid("d0407c25-b0ea-40dc-846c-82c46fbd9fa2") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | }) 12 | defines({ 13 | }) 14 | local_platform_files() 15 | removefiles({"*_demo.cc"}) 16 | removefiles({"windowed_app_main_*.cc"}) 17 | filter("platforms:Android-*") 18 | -- Exports JNI functions. 19 | wholelib("On") 20 | 21 | filter("platforms:Windows") 22 | links({ 23 | "dwmapi", 24 | "dxgi", 25 | "winmm", 26 | }) 27 | 28 | filter("platforms:Linux") 29 | links({ 30 | "xcb", 31 | "X11", 32 | "X11-xcb" 33 | }) -------------------------------------------------------------------------------- /src/xenia/ui/shaders/amd_language.xesli: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #ifndef XENIA_UI_SHADERS_AMD_LANGUAGE_XESLI_ 11 | #define XENIA_UI_SHADERS_AMD_LANGUAGE_XESLI_ 12 | 13 | #if XESL_LANGUAGE_GLSL 14 | #define A_GLSL 1 15 | #elif XESL_LANGUAGE_HLSL 16 | #define A_HLSL 1 17 | #else 18 | #error Unknown shading language for AMD shaders. 19 | #endif 20 | 21 | #endif // XENIA_UI_SHADERS_AMD_LANGUAGE_XESLI_ 22 | -------------------------------------------------------------------------------- /src/xenia/ui/shaders/bytecode/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: false 3 | -------------------------------------------------------------------------------- /src/xenia/ui/shaders/guest_output_bilinear.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "guest_output_bilinear.xesli" 11 | -------------------------------------------------------------------------------- /src/xenia/ui/shaders/guest_output_bilinear_dither.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_GUEST_OUTPUT_DITHER 1 11 | #include "guest_output_bilinear.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/ui/shaders/guest_output_ffx_cas_resample.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "guest_output_ffx_cas_resample.xesli" 11 | -------------------------------------------------------------------------------- /src/xenia/ui/shaders/guest_output_ffx_cas_resample_dither.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_GUEST_OUTPUT_DITHER 1 11 | #include "guest_output_ffx_cas_resample.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/ui/shaders/guest_output_ffx_cas_sharpen.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "guest_output_ffx_cas_sharpen.xesli" 11 | -------------------------------------------------------------------------------- /src/xenia/ui/shaders/guest_output_ffx_cas_sharpen_dither.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_GUEST_OUTPUT_DITHER 1 11 | #include "guest_output_ffx_cas_sharpen.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/ui/shaders/guest_output_ffx_fsr_rcas.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "guest_output_ffx_fsr_rcas.xesli" 11 | -------------------------------------------------------------------------------- /src/xenia/ui/shaders/guest_output_ffx_fsr_rcas_dither.ps.xesl: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2022 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #define XE_GUEST_OUTPUT_DITHER 1 11 | #include "guest_output_ffx_fsr_rcas.xesli" 12 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/device_khr_bind_memory2.inc: -------------------------------------------------------------------------------- 1 | // VK_KHR_bind_memory2 functions used in Xenia. 2 | // Promoted to Vulkan 1.1 core. 3 | XE_UI_VULKAN_FUNCTION_PROMOTED(vkBindBufferMemory2KHR, vkBindBufferMemory2) 4 | XE_UI_VULKAN_FUNCTION_PROMOTED(vkBindImageMemory2KHR, vkBindImageMemory2) 5 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/device_khr_get_memory_requirements2.inc: -------------------------------------------------------------------------------- 1 | // VK_KHR_get_memory_requirements2 functions used in Xenia. 2 | // Promoted to Vulkan 1.1 core. 3 | XE_UI_VULKAN_FUNCTION_PROMOTED(vkGetBufferMemoryRequirements2KHR, 4 | vkGetBufferMemoryRequirements2) 5 | XE_UI_VULKAN_FUNCTION_PROMOTED(vkGetImageMemoryRequirements2KHR, 6 | vkGetImageMemoryRequirements2) 7 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/device_khr_maintenance4.inc: -------------------------------------------------------------------------------- 1 | // VK_KHR_maintenance4 functions used in Xenia. 2 | // Promoted to Vulkan 1.3 core. 3 | XE_UI_VULKAN_FUNCTION_PROMOTED(vkGetDeviceBufferMemoryRequirementsKHR, 4 | vkGetDeviceBufferMemoryRequirements) 5 | XE_UI_VULKAN_FUNCTION_PROMOTED(vkGetDeviceImageMemoryRequirementsKHR, 6 | vkGetDeviceImageMemoryRequirements) 7 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/device_khr_swapchain.inc: -------------------------------------------------------------------------------- 1 | // VK_KHR_swapchain functions used in Xenia. 2 | XE_UI_VULKAN_FUNCTION(vkAcquireNextImageKHR) 3 | XE_UI_VULKAN_FUNCTION(vkCreateSwapchainKHR) 4 | XE_UI_VULKAN_FUNCTION(vkDestroySwapchainKHR) 5 | XE_UI_VULKAN_FUNCTION(vkGetSwapchainImagesKHR) 6 | XE_UI_VULKAN_FUNCTION(vkQueuePresentKHR) 7 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/instance_1_0.inc: -------------------------------------------------------------------------------- 1 | // Vulkan 1.0 core instance functions used in Xenia. 2 | XE_UI_VULKAN_FUNCTION(vkCreateDevice) 3 | XE_UI_VULKAN_FUNCTION(vkDestroyDevice) 4 | XE_UI_VULKAN_FUNCTION(vkEnumerateDeviceExtensionProperties) 5 | XE_UI_VULKAN_FUNCTION(vkEnumeratePhysicalDevices) 6 | XE_UI_VULKAN_FUNCTION(vkGetDeviceProcAddr) 7 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceFeatures) 8 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceFormatProperties) 9 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceMemoryProperties) 10 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceProperties) 11 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceQueueFamilyProperties) 12 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/instance_ext_debug_utils.inc: -------------------------------------------------------------------------------- 1 | // VK_EXT_debug_utils functions used in Xenia. 2 | XE_UI_VULKAN_FUNCTION(vkCreateDebugUtilsMessengerEXT) 3 | XE_UI_VULKAN_FUNCTION(vkDestroyDebugUtilsMessengerEXT) 4 | XE_UI_VULKAN_FUNCTION(vkSetDebugUtilsObjectNameEXT) 5 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/instance_khr_android_surface.inc: -------------------------------------------------------------------------------- 1 | // VK_KHR_android_surface functions used in Xenia. 2 | XE_UI_VULKAN_FUNCTION(vkCreateAndroidSurfaceKHR) 3 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/instance_khr_get_physical_device_properties2.inc: -------------------------------------------------------------------------------- 1 | // VK_KHR_get_physical_device_properties2 functions used in Xenia. 2 | // Promoted to Vulkan 1.1 core. 3 | XE_UI_VULKAN_FUNCTION_PROMOTED(vkGetPhysicalDeviceFeatures2KHR, 4 | vkGetPhysicalDeviceFeatures2) 5 | XE_UI_VULKAN_FUNCTION_PROMOTED(vkGetPhysicalDeviceMemoryProperties2KHR, 6 | vkGetPhysicalDeviceMemoryProperties2) 7 | XE_UI_VULKAN_FUNCTION_PROMOTED(vkGetPhysicalDeviceProperties2KHR, 8 | vkGetPhysicalDeviceProperties2) 9 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/instance_khr_surface.inc: -------------------------------------------------------------------------------- 1 | // VK_KHR_surface functions used in Xenia. 2 | XE_UI_VULKAN_FUNCTION(vkDestroySurfaceKHR) 3 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceSurfaceCapabilitiesKHR) 4 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceSurfaceFormatsKHR) 5 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceSurfacePresentModesKHR) 6 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceSurfaceSupportKHR) 7 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/instance_khr_win32_surface.inc: -------------------------------------------------------------------------------- 1 | // VK_KHR_win32_surface functions used in Xenia. 2 | XE_UI_VULKAN_FUNCTION(vkCreateWin32SurfaceKHR) 3 | XE_UI_VULKAN_FUNCTION(vkGetPhysicalDeviceWin32PresentationSupportKHR) 4 | -------------------------------------------------------------------------------- /src/xenia/ui/vulkan/functions/instance_khr_xcb_surface.inc: -------------------------------------------------------------------------------- 1 | // VK_KHR_xcb_surface functions used in Xenia. 2 | XE_UI_VULKAN_FUNCTION(vkCreateXcbSurfaceKHR) 3 | -------------------------------------------------------------------------------- /src/xenia/ui/windowed_app.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2021 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/ui/windowed_app.h" 11 | 12 | #include 13 | #include 14 | 15 | namespace xe { 16 | namespace ui { 17 | 18 | #if XE_UI_WINDOWED_APPS_IN_LIBRARY 19 | // A zero-initialized pointer to remove dependence on the initialization order 20 | // of the map relatively to the app creator proxies. 21 | std::unordered_map* WindowedApp::creators_; 22 | #endif // XE_UI_WINDOWED_APPS_IN_LIBRARY 23 | 24 | } // namespace ui 25 | } // namespace xe 26 | -------------------------------------------------------------------------------- /src/xenia/ui/windowed_app_main_android.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2021 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | // Not needed - no single entry point, the event loop is polled by the OS. 11 | -------------------------------------------------------------------------------- /src/xenia/vfs/device.cc: -------------------------------------------------------------------------------- 1 | /** 2 | ****************************************************************************** 3 | * Xenia : Xbox 360 Emulator Research Project * 4 | ****************************************************************************** 5 | * Copyright 2020 Ben Vanik. All rights reserved. * 6 | * Released under the BSD license - see LICENSE in the root for more details. * 7 | ****************************************************************************** 8 | */ 9 | 10 | #include "xenia/vfs/device.h" 11 | 12 | #include "xenia/base/logging.h" 13 | 14 | namespace xe { 15 | namespace vfs { 16 | 17 | Device::Device(const std::string_view mount_path) : mount_path_(mount_path) {} 18 | Device::~Device() = default; 19 | 20 | } // namespace vfs 21 | } // namespace xe 22 | -------------------------------------------------------------------------------- /src/xenia/vfs/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../.." 2 | include(project_root.."/tools/build") 3 | 4 | group("src") 5 | project("xenia-vfs") 6 | uuid("395c8abd-4dc9-46ed-af7a-c2b9b68a3a98") 7 | kind("StaticLib") 8 | language("C++") 9 | links({ 10 | "xenia-base", 11 | "zstd", 12 | "zarchive" 13 | }) 14 | defines({ 15 | }) 16 | 17 | recursive_platform_files() 18 | removefiles({"vfs_dump.cc"}) 19 | 20 | if enableMiscSubprojects then 21 | project("xenia-vfs-dump") 22 | uuid("2EF270C7-41A8-4D0E-ACC5-59693A9CCE32") 23 | kind("ConsoleApp") 24 | language("C++") 25 | links({ 26 | "fmt", 27 | "xenia-base", 28 | "xenia-vfs", 29 | }) 30 | defines({}) 31 | 32 | files({ 33 | "vfs_dump.cc", 34 | project_root.."/src/xenia/base/console_app_main_"..platform_suffix..".cc", 35 | }) 36 | resincludedirs({ 37 | project_root, 38 | }) 39 | end 40 | 41 | if enableTests then 42 | include("testing") 43 | end 44 | -------------------------------------------------------------------------------- /src/xenia/vfs/testing/premake5.lua: -------------------------------------------------------------------------------- 1 | project_root = "../../../.." 2 | include(project_root.."/tools/build") 3 | 4 | test_suite("xenia-vfs-tests", project_root, ".", { 5 | links = { 6 | "xenia-vfs", 7 | }, 8 | }) 9 | -------------------------------------------------------------------------------- /third_party/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: false 3 | -------------------------------------------------------------------------------- /third_party/aes_128.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("aes_128") 3 | uuid("b50458bf-dd83-4c1a-8cad-61f5fbbfd720") 4 | kind("StaticLib") 5 | language("C") 6 | defines({ 7 | "_LIB", 8 | }) 9 | includedirs({ 10 | "aes_128", 11 | }) 12 | files({ 13 | "aes_128/aes.h", 14 | "aes_128/unroll/aes.c", 15 | }) 16 | -------------------------------------------------------------------------------- /third_party/binutils/README.md: -------------------------------------------------------------------------------- 1 | The patch found in this folder is for the binutils-2.24 snapshot. 2 | It's a rebase of Sebastian Biallas' ancient patch that was never upstreamed into 3 | mainline binutils: https://sourceware.org/ml/binutils/2007-03/msg00366.html 4 | 5 | You can find a snapshot of 2.24 here: 6 | http://mirrors.kernel.org/sourceware/binutils/releases/binutils-2.24.tar.gz 7 | 8 | Build on cygwin with: `bash -x -o igncr build.sh` 9 | -------------------------------------------------------------------------------- /third_party/crypto/des/README.md: -------------------------------------------------------------------------------- 1 | cppDES 2 | ====== 3 | 4 | Taken from [this repository](https://github.com/fffaraz/cppDES) 5 | 6 | Modified for use by Xenia. -------------------------------------------------------------------------------- /third_party/crypto/des/des3.h: -------------------------------------------------------------------------------- 1 | #ifndef DES3_H 2 | #define DES3_H 3 | 4 | #include "des.h" 5 | 6 | class DES3 7 | { 8 | public: 9 | DES3(ui64 k1, ui64 k2, ui64 k3) : des{ DES(k1), DES(k2), DES(k3) } {} 10 | DES3(ui64* sk1, ui64* sk2, ui64* sk3) : des{ DES(sk1), DES(sk2), DES(sk3) } {} 11 | 12 | inline ui64 encrypt(ui64 block) 13 | { 14 | return des[2].encrypt(des[1].decrypt(des[0].encrypt(block))); 15 | } 16 | 17 | inline ui64 decrypt(ui64 block) 18 | { 19 | return des[0].decrypt(des[1].encrypt(des[2].decrypt(block))); 20 | } 21 | 22 | inline ui64 crypt(ui64 block, bool bEncrypt) 23 | { 24 | if (bEncrypt) 25 | { 26 | return encrypt(block); 27 | } 28 | else 29 | { 30 | return decrypt(block); 31 | } 32 | } 33 | 34 | inline DES* getDES() { return des; } 35 | 36 | private: 37 | DES des[3]; 38 | }; 39 | 40 | #endif // DES3_H 41 | -------------------------------------------------------------------------------- /third_party/crypto/des/des_key.h: -------------------------------------------------------------------------------- 1 | #ifndef DES_KEY_H 2 | #define DES_KEY_H 3 | 4 | // Permuted Choice 1 Table [7*8] 5 | static const char PC1[] = 6 | { 7 | 57, 49, 41, 33, 25, 17, 9, 8 | 1, 58, 50, 42, 34, 26, 18, 9 | 10, 2, 59, 51, 43, 35, 27, 10 | 19, 11, 3, 60, 52, 44, 36, 11 | 12 | 63, 55, 47, 39, 31, 23, 15, 13 | 7, 62, 54, 46, 38, 30, 22, 14 | 14, 6, 61, 53, 45, 37, 29, 15 | 21, 13, 5, 28, 20, 12, 4 16 | }; 17 | 18 | // Permuted Choice 2 Table [6*8] 19 | static const char PC2[] = 20 | { 21 | 14, 17, 11, 24, 1, 5, 22 | 3, 28, 15, 6, 21, 10, 23 | 23, 19, 12, 4, 26, 8, 24 | 16, 7, 27, 20, 13, 2, 25 | 41, 52, 31, 37, 47, 55, 26 | 30, 40, 51, 45, 33, 48, 27 | 44, 49, 39, 56, 34, 53, 28 | 46, 42, 50, 36, 29, 32 29 | }; 30 | 31 | // Iteration Shift Array 32 | static const char ITERATION_SHIFT[] = 33 | { 34 | // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 35 | 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1 36 | }; 37 | 38 | #endif // DES_KEY_H 39 | -------------------------------------------------------------------------------- /third_party/crypto/des/des_lookup.h: -------------------------------------------------------------------------------- 1 | #ifndef DES_LOOKUP_H 2 | #define DES_LOOKUP_H 3 | 4 | #endif // DES_LOOKUP_H 5 | -------------------------------------------------------------------------------- /third_party/crypto/des/descbc.h: -------------------------------------------------------------------------------- 1 | #ifndef DESCBC_H 2 | #define DESCBC_H 3 | 4 | #include "des.h" 5 | 6 | class DESCBC 7 | { 8 | public: 9 | DESCBC(ui64 key, ui64 iv) : des(key), iv(iv), last_block(iv) {} 10 | inline ui64 encrypt(ui64 block) 11 | { 12 | last_block = des.encrypt(block ^ last_block); 13 | return last_block; 14 | } 15 | 16 | inline ui64 decrypt(ui64 block) 17 | { 18 | ui64 result = des.decrypt(block) ^ last_block; 19 | last_block = block; 20 | return result; 21 | } 22 | 23 | inline void reset() 24 | { 25 | last_block = iv; 26 | } 27 | 28 | private: 29 | DES des; 30 | ui64 iv; 31 | ui64 last_block; 32 | }; 33 | 34 | #endif // DESCBC_H 35 | -------------------------------------------------------------------------------- /third_party/cxxopts.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("cxxopts") 3 | uuid("8b68cbe8-2da4-4f28-be14-9352eafa3168") 4 | if os.istarget("android") then 5 | -- ndk-build only supports StaticLib and SharedLib. 6 | kind("StaticLib") 7 | else 8 | kind("Utility") 9 | end 10 | language("C++") 11 | files({ 12 | "cxxopts/include/cxxopts.hpp", 13 | }) 14 | warnings("Off") 15 | -------------------------------------------------------------------------------- /third_party/dxbc.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("dxbc") 3 | uuid("c96688ca-51ca-406e-aeef-068734a67abe") 4 | kind("StaticLib") 5 | language("C++") 6 | links({ 7 | }) 8 | defines({ 9 | "_LIB", 10 | }) 11 | includedirs({ 12 | "dxbc", 13 | }) 14 | files({ 15 | "dxbc/DXBCChecksum.cpp", 16 | "dxbc/DXBCChecksum.h", 17 | }) 18 | -------------------------------------------------------------------------------- /third_party/fmt.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("fmt") 3 | uuid("b9ff4b2c-b438-42a9-971e-e0c19a711a13") 4 | kind("StaticLib") 5 | language("C++") 6 | links({ 7 | }) 8 | defines({ 9 | "_LIB", 10 | }) 11 | -- filter({"configurations:Release", "platforms:Windows"}) 12 | -- buildoptions({ 13 | -- "/O1", 14 | -- }) 15 | -- filter {} 16 | 17 | includedirs({ 18 | "fmt/include", 19 | }) 20 | files({ 21 | "fmt/src/format.cc", 22 | "fmt/src/os.cc" 23 | }) 24 | -------------------------------------------------------------------------------- /third_party/imgui.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("imgui") 3 | uuid("ed9271c4-b0a1-42ef-8403-067b11bf49d0") 4 | kind("StaticLib") 5 | language("C++") 6 | links({ 7 | }) 8 | defines({ 9 | "_LIB", 10 | }) 11 | includedirs({ 12 | "imgui", 13 | }) 14 | -- filter({"configurations:Release", "platforms:Windows"}) 15 | -- buildoptions({ 16 | -- "/O1", 17 | -- }) 18 | -- filter{} 19 | files({ 20 | "imgui/imconfig.h", 21 | "imgui/imgui.cpp", 22 | "imgui/imgui.h", 23 | "imgui/imgui_demo.cpp", 24 | "imgui/imgui_draw.cpp", 25 | "imgui/imgui_internal.h", 26 | "imgui/imgui_tables.cpp", 27 | "imgui/imgui_widgets.cpp", 28 | "imgui/imstb_rectpack.h", 29 | "imgui/imstb_textedit.h", 30 | "imgui/imstb_truetype.h", 31 | }) 32 | -------------------------------------------------------------------------------- /third_party/microprofile/README.md: -------------------------------------------------------------------------------- 1 | # microprofile 2 | 3 | MicroProfile is a embeddable profiler in a single file, written in C++ 4 | 5 | It can display profile information in the application, or by generating captures via a minimal built in webserver. 6 | 7 | # Dependencies 8 | Microprofile supports generating compressed captures using miniz(http:/code.google.com/miniz). 9 | 10 | # License 11 | Licensed using unlicense.org 12 | 13 | # Screenshot 14 | ![Microprofile in action](https://pbs.twimg.com/media/BnvzublCEAA0Mqf.png:large) 15 | -------------------------------------------------------------------------------- /third_party/mspack.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("mspack") 3 | uuid("0881692A-75A1-4E7B-87D8-BB9108CEDEA4") 4 | kind("StaticLib") 5 | language("C++") 6 | links({ 7 | "xenia-base", 8 | }) 9 | defines({ 10 | "_LIB", 11 | "HAVE_CONFIG_H", 12 | }) 13 | removedefines({ 14 | "_UNICODE", 15 | "UNICODE", 16 | }) 17 | includedirs({ 18 | "mspack", 19 | }) 20 | files({ 21 | "mspack/logging.cc", 22 | "mspack/lzx.h", 23 | "mspack/lzxd.c", 24 | "mspack/mspack.h", 25 | "mspack/readbits.h", 26 | "mspack/readhuff.h", 27 | "mspack/system.c", 28 | "mspack/system.h", 29 | }) 30 | 31 | filter("platforms:Windows") 32 | defines({ 33 | }) 34 | filter("platforms:Linux") 35 | defines({ 36 | }) 37 | -------------------------------------------------------------------------------- /third_party/mspack/logging.cc: -------------------------------------------------------------------------------- 1 | #include "xenia/base/logging.h" 2 | 3 | #include 4 | 5 | extern "C" void xenia_log(const char* fmt, ...) { 6 | char buffer[128]; 7 | va_list args; 8 | va_start(args, fmt); 9 | vsnprintf(buffer, sizeof(buffer), fmt, args); 10 | va_end(args); 11 | XELOGW("mspack: {}", buffer); 12 | } 13 | -------------------------------------------------------------------------------- /third_party/pugixml.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("pugixml") 3 | uuid("d1089e5e-46ae-48c9-bee6-d38c674c8f61") 4 | kind("StaticLib") 5 | language("C++") 6 | files({ 7 | "pugixml/src/pugiconfig.hpp", 8 | "pugixml/src/pugixml.cpp", 9 | "pugixml/src/pugixml.hpp", 10 | }) -------------------------------------------------------------------------------- /third_party/snappy.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("snappy") 3 | uuid("bb143d61-3fd4-44c2-8b7e-04cc538ba2c7") 4 | kind("StaticLib") 5 | language("C++") 6 | 7 | defines({ 8 | "_LIB", 9 | }) 10 | files({ 11 | "snappy/snappy-internal.h", 12 | "snappy/snappy-sinksource.cc", 13 | "snappy/snappy-sinksource.h", 14 | "snappy/snappy-stubs-internal.cc", 15 | "snappy/snappy-stubs-internal.h", 16 | "snappy/snappy-stubs-public.h", 17 | "snappy/snappy.cc", 18 | "snappy/snappy.h", 19 | }) 20 | 21 | filter("platforms:Windows") 22 | warnings("Off") -- Too many warnings. 23 | -------------------------------------------------------------------------------- /third_party/tomlplusplus.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("tomlplusplus") 3 | uuid("1e86cc51-3f8b-476d-9249-3b200424846b") 4 | if os.istarget("android") then 5 | -- ndk-build only supports StaticLib and SharedLib. 6 | kind("StaticLib") 7 | else 8 | kind("Utility") 9 | end 10 | language("C++") 11 | files({ 12 | "tomlplusplus/include/toml++/toml.hpp" 13 | }) 14 | -------------------------------------------------------------------------------- /third_party/xxhash.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("xxhash") 3 | uuid("40d4ce21-5448-4399-9f98-589b7e1c23b1") 4 | kind("StaticLib") 5 | language("C") 6 | links({ 7 | }) 8 | defines({ 9 | "_LIB", 10 | }) 11 | includedirs({ 12 | "xxhash", 13 | }) 14 | files({ 15 | "xxhash/xxhash.c", 16 | "xxhash/xxhash.h", 17 | }) 18 | -------------------------------------------------------------------------------- /third_party/zarchive.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("zarchive") 3 | uuid("d32f03aa-f0c9-11ed-a05b-0242ac120003") 4 | kind("StaticLib") 5 | language("C++") 6 | links({ 7 | "zstd", 8 | }) 9 | defines({ 10 | "_LIB", 11 | }) 12 | includedirs({ 13 | "zarchive/include", 14 | "zstd/lib", 15 | }) 16 | files({ 17 | "zarchive/include/zarchive/zarchivecommon.h", 18 | "zarchive/include/zarchive/zarchivereader.h", 19 | "zarchive/include/zarchive/zarchivewriter.h", 20 | "zarchive/src/zarchivereader.cpp", 21 | "zarchive/src/zarchivewriter.cpp", 22 | "zarchive/src/sha_256.c", 23 | "zarchive/src/sha_256.h", 24 | }) 25 | -------------------------------------------------------------------------------- /third_party/zlib.lua: -------------------------------------------------------------------------------- 1 | group("third_party") 2 | project("zlib") 3 | uuid("13d4073d-f1c9-47e3-a057-79b133596fc2") 4 | kind("StaticLib") 5 | language("C") 6 | cdialect("C90") 7 | filter({"toolset:gcc or clang"}) 8 | buildoptions({ 9 | "-Wno-implicit-function-declaration" 10 | }) 11 | filter {} 12 | 13 | files({ 14 | "zlib/*.c", 15 | "zlib/*.h", 16 | }) -------------------------------------------------------------------------------- /tools/build/bin/premake5.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/tools/build/bin/premake5.exe -------------------------------------------------------------------------------- /tools/build/premake5.lua: -------------------------------------------------------------------------------- 1 | require("vstudio") 2 | 3 | include("scripts/build_paths.lua") 4 | include("scripts/force_compile_as_c.lua") 5 | include("scripts/force_compile_as_cc.lua") 6 | include("scripts/pkg_config.lua") 7 | include("scripts/platform_files.lua") 8 | include("scripts/single_library.lua") 9 | include("scripts/test_suite.lua") 10 | -------------------------------------------------------------------------------- /tools/build/scripts/build_paths.lua: -------------------------------------------------------------------------------- 1 | build_root = "build" 2 | build_bin = build_root .. "/bin/%{cfg.platform}/%{cfg.buildcfg}" 3 | build_gen = build_root .. "/gen/%{cfg.platform}/%{cfg.buildcfg}" 4 | build_obj = build_root .. "/obj/%{cfg.platform}/%{cfg.buildcfg}" 5 | 6 | build_tools = "tools/build" 7 | build_scripts = build_tools .. "/scripts" 8 | build_tools_src = build_tools .. "/src" 9 | 10 | if os.istarget("android") then 11 | platform_suffix = "android" 12 | elseif os.istarget("windows") then 13 | platform_suffix = "win" 14 | else 15 | platform_suffix = "posix" 16 | end 17 | -------------------------------------------------------------------------------- /tools/build/scripts/single_library.lua: -------------------------------------------------------------------------------- 1 | SINGLE_LIBRARY_PLATFORM_PATTERNS = { 2 | "Android-*", 3 | }; 4 | 5 | SINGLE_LIBRARY_FILTER = 6 | "platforms:" .. table.concat(SINGLE_LIBRARY_PLATFORM_PATTERNS, " or "); 7 | NOT_SINGLE_LIBRARY_FILTER = table.translate( 8 | SINGLE_LIBRARY_PLATFORM_PATTERNS, 9 | function(pattern) 10 | return "platforms:not " .. pattern; 11 | end); 12 | 13 | function single_library_windowed_app_kind() 14 | filter(SINGLE_LIBRARY_FILTER); 15 | kind("StaticLib"); 16 | wholelib("On"); 17 | filter(NOT_SINGLE_LIBRARY_FILTER); 18 | kind("WindowedApp"); 19 | filter({}); 20 | end 21 | -------------------------------------------------------------------------------- /tools/diff.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """python diff.py file1 file2 diff""" 4 | 5 | import difflib 6 | import sys 7 | 8 | diff = difflib.unified_diff( 9 | open(sys.argv[1], encoding='utf-8').readlines(), 10 | open(sys.argv[2], encoding='utf-8').readlines()) 11 | with open(sys.argv[3], 'w', encoding='utf-8') as f: 12 | f.write(''.join(diff)) 13 | -------------------------------------------------------------------------------- /tools/shader-playground/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tools/shader-playground/README.md: -------------------------------------------------------------------------------- 1 | This requires XNA Game Studio 3.1 to be installed (not just the redist): 2 | https://www.microsoft.com/en-us/download/details.aspx?id=39 3 | 4 | It's not really compatible with modern VS', but you can open the downloaded 5 | `XNAGS31_setup.exe` with 7zip and run the included `redists.msi` directly. 6 | 7 | If installed correctly you should have this file: 8 | `C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v3.1\References\Windows\x86\Microsoft.Xna.Framework.dll` 9 | 10 | XNA is only compatible with 32-bit x86 .NET, so ensure Visual Studio is set to 11 | target that (not `Any CPU`). 12 | -------------------------------------------------------------------------------- /tools/shader-playground/shader-playground.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.23107.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "shader-playground", "shader-playground.csproj", "{05D27AD4-EF23-4FA1-AD5A-7CFD587FD093}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {05D27AD4-EF23-4FA1-AD5A-7CFD587FD093}.Debug|x86.ActiveCfg = Debug|x86 15 | {05D27AD4-EF23-4FA1-AD5A-7CFD587FD093}.Debug|x86.Build.0 = Debug|x86 16 | {05D27AD4-EF23-4FA1-AD5A-7CFD587FD093}.Release|x86.ActiveCfg = Release|x86 17 | {05D27AD4-EF23-4FA1-AD5A-7CFD587FD093}.Release|x86.Build.0 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /tools/vswhere/vswhere.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seven7000real/xenia-canary/416facab21523a10a3c39ced31b7edbde9df4f3e/tools/vswhere/vswhere.exe -------------------------------------------------------------------------------- /xb: -------------------------------------------------------------------------------- 1 | xenia-build -------------------------------------------------------------------------------- /xeniarc: -------------------------------------------------------------------------------- 1 | # Copyright 2015 Ben Vanik. All Rights Reserved. 2 | # 3 | # Useful bash aliases and completions. 4 | 5 | alias xb='python xenia-build' 6 | --------------------------------------------------------------------------------