00cc9309cb
de6e324bdseparate emu thread10d3daf86Roms List improvements95d202f37Let's make the rom list process on a separate thread so the emulator doesnt take ages to load.fc306967fWow the ROM Header was just completely busted. Game list view works nowbad1691eefuck this shit2b59e5f46game list in progressd26417b83remappable inputs in progressac4af8106inpute72abc240update readme430139dc9Qt6 frontend3080d4d45Fix this small bug too08cd13b85Cop0 unused functions do not actually pose a threat (as per manual). They don't do anything, so shall we.61bb4fb44make idle loop detection a little more specific with where the load goesb037de4c3SAZDFsdff12e81e73eneed to figure out why n64-systemtest loops indefinitely at some address that appears to be valid (i think it's me not invalidating the cache properly)204f0e13bidle skipping seems to work!cb8bb634asdkfjlasdf58e5c89c1Fix compilation issue on my machine (no idea)24fb2898eattempting more serious idle skipping214719577Place rsp.Step inside cached interpreter. Gains about 3 more fpsbb97dcc23mmmmm920b77d38wjkhasdfjhkasdf430ccdab4it's a start...4f42a673aCached interpreter plays Mario 64. Start looking into RSP as wellc9a030787idle skipping works!5fbda03cenew idea366637abaIdle skipping... maybe?609fa2fb0Cache instructions implemented but broken lmao. Commented out for nowe140a6d12- Stop using inheritance for CPU, instead use composition. - Introduce KAIZEN_JIT_ENABLED optional define instead of relying on __aarch64__ and the like. - More cache work68e613057prep cache impl811b4d809fix clang formatfda755f7didkd5024ebbfsmall MI refactor in preparation of (eventually) implementing the RDRAM interface properly694b45341Merge commit '206dcdedf195fb320913584180edb12c7731e396' as 'external/SDL'206dcdedfSquashed 'external/SDL/' content from commit 4d17b99d0a4d16e1cb4need to update sdl848b19920Fix compilation errordb61b5299Merge commit 'e94a94559f28e49678fbcf72199a5258137b0fe9' as 'external/imgui'e94a94559Squashed 'external/imgui/' content from commit 02e9b8cac52edb3757need to update imguic1a705e86Emulate weird JALR behaviour4b4c32f4bFix exception for "unusable COP1" in 4 instructions i missed accidentally (again)df5828142Bug putting 0s in the log everywheref8b580048Make isviewer a sink to file8241e9735Fix exception for "unusable COP1" in 4 instructions i missed accidentallyb29715f20small changesd9a620bc1make use of my new small utility library0d1aa938eAdd 'external/ircolib/' from commit 'ce3cd726c8df8388d554abf8bb55d55020eb4450'e64eb40b3Fuck git git-subtree-dir: external/ircolib git-subtree-split:de6e324bde
129 lines
6.2 KiB
Markdown
129 lines
6.2 KiB
Markdown
# Windows
|
|
|
|
## Old systems
|
|
|
|
WinRT, Windows Phone, and UWP are no longer supported.
|
|
|
|
All desktop Windows versions, back to Windows XP, are still supported.
|
|
|
|
## LLVM and Intel C++ compiler support
|
|
|
|
SDL will build with the Visual Studio project files with LLVM-based compilers, such as the Intel oneAPI C++
|
|
compiler, but you'll have to manually add the "-msse3" command line option
|
|
to at least the SDL_audiocvt.c source file, and possibly others. This may
|
|
not be necessary if you build SDL with CMake instead of the included Visual
|
|
Studio solution.
|
|
|
|
Details are here: https://github.com/libsdl-org/SDL/issues/5186
|
|
|
|
## MinGW-w64 compiler support
|
|
|
|
SDL can be built with MinGW-w64 and CMake. Minimum tested MinGW-w64 version is 8.0.3.
|
|
|
|
On a Windows host, you first need to install and set up the MSYS2 environment, which provides the MinGW-w64 toolchain. Install MSYS2, typically to `C:\msys64`, and follow the instructions on the MSYS2 wiki to use the MinGW-w64 shell to update all components in the MSYS2 environment. This generally amounts to running `pacman -Syuu` from the mingw64 shell, but refer to MSYS2's documentation for more details. Once the MSYS2 environment has been updated, install the x86_64 MinGW toolchain from the mingw64 shell with the command `pacman -S mingw-w64-x86_64-toolchain`. (You can additionally install `mingw-w64-i686-toolchain` if you intend to build 32-bit binaries as well. The remainder of this section assumes you only want to build 64-bit binaries.)
|
|
|
|
To build and install SDL, you can use PowerShell or any CMake-compatible IDE. First, install CMake, Ninja, and Git. These tools can be installed using any number of tools, such as the MSYS2's `pacman`, `winget`, `Chocolatey`, or by manually downloading and running the installers. Clone SDL to an appropriate location with `git` and run the following commands from the root of the cloned repository:
|
|
|
|
```sh
|
|
mkdir build
|
|
cmake -S . -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE=build-scripts/cmake-toolchain-mingw64-x86_64.cmake
|
|
cmake --build build --parallel
|
|
cmake --install build --prefix C:/Libraries
|
|
```
|
|
|
|
This installs SDL to `C:\Libraries`. You can specify another directory of your choice as desired. Ensure that your `CMAKE_PREFIX_PATH` includes `C:\Libraries` when you want to build against this copy of SDL. The simplest way to do this is to pass it to CMake as an option at configuration time:
|
|
|
|
```sh
|
|
cmake .. -G Ninja -DCMAKE_PREFIX_PATH=C:/Libraries
|
|
```
|
|
|
|
You will also need to configure CMake to use the MinGW-w64 toolchain to build your own project. Here is a minimal toolchain file that you could use for this purpose:
|
|
|
|
```
|
|
set(CMAKE_SYSTEM_NAME Windows)
|
|
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
|
|
|
find_program(CMAKE_C_COMPILER NAMES x86_64-w64-mingw32-gcc REQUIRED)
|
|
find_program(CMAKE_CXX_COMPILER NAMES x86_64-w64-mingw32-g++ REQUIRED)
|
|
find_program(CMAKE_RC_COMPILER NAMES x86_64-w64-mingw32-windres windres REQUIRED)
|
|
```
|
|
|
|
Save this in your project and refer to it at configuration time with the option `-DCMAKE_TOOLCHAIN_FILE`.
|
|
|
|
On Windows, you also need to copy `SDL3.dll` to an appropriate directory so that the game can find it at runtime. For guidance, see [README-cmake.md](README-cmake.md#how-do-i-copy-a-sdl3-dynamic-library-to-another-location).
|
|
|
|
Below is a minimal `CMakeLists.txt` file to build your game linked against a system SDL that was built with the MinGW-w64 toolchain. See [README-cmake.md](README-cmake.md) for more details on including SDL in your CMake project.
|
|
|
|
```cmake
|
|
cmake_minimum_required(VERSION 3.15)
|
|
project(mygame)
|
|
|
|
find_package(SDL3 REQUIRED CONFIG COMPONENTS SDL3-shared)
|
|
|
|
add_executable(mygame WIN32 mygame.c)
|
|
target_link_libraries(mygame PRIVATE SDL3::SDL3)
|
|
|
|
# On Windows, copy SDL3.dll to the build directory
|
|
if(WIN32)
|
|
add_custom_command(
|
|
TARGET mygame POST_BUILD
|
|
COMMAND "${CMAKE_COMMAND}" -E copy $<TARGET_FILE:SDL3::SDL3-shared> $<TARGET_FILE_DIR:mygame>
|
|
VERBATIM
|
|
)
|
|
endif()
|
|
```
|
|
|
|
## OpenGL ES 2.x support
|
|
|
|
SDL has support for OpenGL ES 2.x under Windows via two alternative
|
|
implementations.
|
|
|
|
The most straightforward method consists in running your app in a system with
|
|
a graphic card paired with a relatively recent (as of November of 2013) driver
|
|
which supports the WGL_EXT_create_context_es2_profile extension. Vendors known
|
|
to ship said extension on Windows currently include nVidia and Intel.
|
|
|
|
The other method involves using the
|
|
[ANGLE library](https://code.google.com/p/angleproject/). If an OpenGL ES 2.x
|
|
context is requested and no WGL_EXT_create_context_es2_profile extension is
|
|
found, SDL will try to load the libEGL.dll library provided by ANGLE.
|
|
|
|
To obtain the ANGLE binaries, you can either compile from source from
|
|
https://chromium.googlesource.com/angle/angle or copy the relevant binaries
|
|
from a recent Chrome/Chromium install for Windows. The files you need are:
|
|
|
|
- libEGL.dll
|
|
- libGLESv2.dll
|
|
- d3dcompiler_46.dll (supports Windows Vista or later, better shader
|
|
compiler) *or* d3dcompiler_43.dll (supports Windows XP or later)
|
|
|
|
If you compile ANGLE from source, you can configure it so it does not need the
|
|
d3dcompiler_* DLL at all (for details on this, see their documentation).
|
|
However, by default SDL will try to preload the d3dcompiler_46.dll to
|
|
comply with ANGLE's requirements. If you wish SDL to preload
|
|
d3dcompiler_43.dll (to support Windows XP) or to skip this step at all, you
|
|
can use the SDL_HINT_VIDEO_WIN_D3DCOMPILER hint (see SDL_hints.h for more
|
|
details).
|
|
|
|
Known Bugs:
|
|
|
|
- SDL_GL_SetSwapInterval is currently a no op when using ANGLE. It appears
|
|
that there's a bug in the library which prevents the window contents from
|
|
refreshing if this is set to anything other than the default value.
|
|
|
|
## Vulkan Surface Support
|
|
|
|
Support for creating Vulkan surfaces is configured on by default. To disable
|
|
it change the value of `SDL_VIDEO_VULKAN` to 0 in `SDL_config_windows.h`. You
|
|
must install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) in order to
|
|
use Vulkan graphics in your application.
|
|
|
|
## Transparent Window Support
|
|
|
|
SDL uses the Desktop Window Manager (DWM) to create transparent windows. DWM is
|
|
always enabled from Windows 8 and above. Windows 7 only enables DWM with Aero Glass
|
|
theme.
|
|
|
|
However, it cannot be guaranteed to work on all hardware configurations (an example
|
|
is hybrid GPU systems, such as NVIDIA Optimus laptops).
|