2.5 KiB
2.5 KiB
Install
sdl2 together with its dependencies (sdl_gfx sdl2_image sdl2_mixer sdl2_ttf)
are required to be installed on your machine.
Linux
Arch-based distros can use these packages:
yay -Syu sdl2 sdl2_gfx sdl2_image sdl2_mixer sdl2_ttf
Windows
- Make sure you have an installation of Visual Studio with the English language pack!
- Install Rustup from the official website https://www.rust-lang.org/tools/install
- Download the following
sdl2dependencies: - Unpack the downloaded files.
- Copy all the files from the
libdirectory of the respective extracted folder toC:\user\%USERNAME%\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib. sdl2_gfxneeds to be compiled for windows manually. Download and Install GitBash https://git-scm.com/downloads- Create an empty folder, right-click in it and select "Git Bash Here".
- Copy and Paste the following command and press Enter
git clone https://github.com/microsoft/vcpkg. Wait for the download to complete. - Close Git Bash and open the new "vcpkg" folder. Run
bootstrap-vcpkg.batas administrator. If done correctly a "vcpkg.exe" file should appear. - Shift-right-click and select "Open PowerShell Window Here" in the "vcpkg" folder. A command prompt will open.
- Copy and Paste the following command and press Enter
vcpkg.exe install sdl2-gfx --triplet x64-windows(It'll give you an error if you're missing VS). - Navigate to \installed\x64-windows\lib in your vcpkg folder and copy
SDL2.libandSDL2_gfx.libtoC:\user\%USERNAME%\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib. - Download the source code by clicking the download button at the top of this page and selecting "Download Zip". Extract the file anywhere on your machine.
- Open a PowerShell Window by shift-right-clicking in the "chip8-rs-master" folder.
- Copy and Paste the following command and press Enter
cargo build.
You can now use the emulator by opening a command prompt in your "chip8-rs-master" folder and using the command cargo run [PATH_TO_FILE].
If the emulator doesn't recognize your dump, try putting it in the "chip8-rs-master" folder and use cargo run [FILENAME].