From 5e520c819d2e6b868eb2361a7dca0f598c75a850 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Sun, 4 Jun 2023 21:36:39 +0100
Subject: [PATCH] docs: new docs

---
 frontends/sdl/README.md | 157 +++++++++++++++++++++-------------------
 1 file changed, 84 insertions(+), 73 deletions(-)

diff --git a/frontends/sdl/README.md b/frontends/sdl/README.md
index 62b7af75..b932b448 100644
--- a/frontends/sdl/README.md
+++ b/frontends/sdl/README.md
@@ -1,73 +1,84 @@
-# Boytacean SDL
-
-## Build
-
-### Build SDL using [vcpkg](https://vcpkg.io/)
-
-To be able to run the `cargo build` one must first install a local version of `vcpkg` using:
-
-```bash
-cargo install cargo-vcpkg
-cargo vcpkg build
-cargo build
-```
-
-#### Build SDL in Windows
-
-For windows the vcpk based SDL building is simpler:
-
-```bash
-cargo install cargo-vcpkg
-cargo build
-```
-
-Make sure that the current Rust in use is msvc based using:
-
-```bash
-rustup default stable-msvc
-```
-
-For more information check [GitHub - Rust-SDL2/rust-sdl2](https://github.com/Rust-SDL2/rust-sdl2).
-
-### Build binaries
-
-Then you can use the following command to build and run Boytacean SDL:
-
-```bash
-cargo build
-cargo run
-```
-
-To reload the code continuously use the cargo watch tool:
-
-```bash
-cargo install cargo-watch
-cargo watch -x run
-```
-
-There are some feature flags that control the verbosity of the emulator to run in debug mode use:
-
-```bash
-cargo build --features debug
-```
-
-To obtain more information about the issues.
-
-## Execution
-
-### Headless
-
-It's possible to run the emulator in headless mode using the `--headless` parameter:
-
-```bash
-cargo run  -- --rom-path ../../res/roms/test/blargg/cpu/cpu_instrs.gb --cycles 100000000  --headless --device stdout --unlimited
-```
-
-## Features
-
-| Provider   | Description                                                                                                                                |
-| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
-| `debug`    | Activates the base `debug` feature from Boytacean.                                                                                         |
-| `pedantic` | Additional safety instructions are executed to make sure the machine does no run "out of tracks", making sure to run many `panic()` calls. |
-| `slow`     | Runs the emulator at a very slow page 60x slower to allow visual debugging.                                                                |
-| `cpulog`   | Prints a log of the CPU instruction executed.                                                                                              |
+# Boytacean SDL
+
+## Build
+
+### Build SDL using [vcpkg](https://vcpkg.io/)
+
+To be able to run the `cargo build` one must first install a local version of `vcpkg` using:
+
+```bash
+cargo install cargo-vcpkg
+cargo vcpkg build
+cargo build
+```
+
+#### Build SDL in Windows
+
+For windows the vcpkg based SDL building is simpler:
+
+```bash
+cargo install cargo-vcpkg
+cargo build
+```
+
+Make sure that the current Rust in use is MSVC based using:
+
+```bash
+rustup default stable-msvc
+```
+
+For more information check [GitHub - Rust-SDL2/rust-sdl2](https://github.com/Rust-SDL2/rust-sdl2).
+
+### Build binaries
+
+Then you can use the following command to build and run Boytacean SDL:
+
+```bash
+cargo build
+cargo run
+```
+
+To reload the code continuously use the cargo watch tool:
+
+```bash
+cargo install cargo-watch
+cargo watch -x run
+```
+
+There are some feature flags that control the verbosity of the emulator to run in debug mode use:
+
+```bash
+cargo build --features debug
+```
+
+To obtain more information about the issues.
+
+### Troubleshooting
+
+#### I'm facing issues with the vcpkg binaries
+
+If there're issues with the `cargo vcpkg build` build process you may need to remove the `~/.vcpkg-root` and re rung the process to re-build the whole set of packages.
+
+### I'm having difficulties building SDL for arm64
+
+Try the above strategy.
+If that does not work try to remove the `Cargo.lock` file to flush dependencies.
+
+## Execution
+
+### Headless
+
+It's possible to run the emulator in headless mode using the `--headless` parameter:
+
+```bash
+cargo run  -- --rom-path ../../res/roms/test/blargg/cpu/cpu_instrs.gb --cycles 100000000  --headless --device stdout --unlimited
+```
+
+## Features
+
+| Provider   | Description                                                                                                                                |
+| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
+| `debug`    | Activates the base `debug` feature from Boytacean.                                                                                         |
+| `pedantic` | Additional safety instructions are executed to make sure the machine does no run "out of tracks", making sure to run many `panic()` calls. |
+| `slow`     | Runs the emulator at a very slow page 60x slower to allow visual debugging.                                                                |
+| `cpulog`   | Prints a log of the CPU instruction executed.                                                                                              |
-- 
GitLab