Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ the ANGLE dylib files into the `build` dir, so it can load them. Remember to run
If there are any issues, feel free to open an issue & PR request.

**Requirements:**
- Git (https://git-scm.com/)
- MinGW-w64 (https://www.mingw-w64.org/)
- CMake (https://cmake.org/download/)

Follow these steps to install MinGW-w64 for Windows: https://code.visualstudio.com/docs/cpp/config-mingw#_installing-the-mingww64-toolchain
**Follow these steps to install MinGW-w64 for Windows:** https://code.visualstudio.com/docs/cpp/config-mingw#_installing-the-mingww64-toolchain

Change the default compiler to use in CMakeList.txt to the following:
```cmake
Expand All @@ -101,7 +102,8 @@ Once complete, continue in Powershell:
git clone https://github.com/npxtune/chisel8.git
cd chisel8
git submodule update --init --recursive # To fetch raylib & raygui
mkdir build && cd ./build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j 6 # '6' -> How many cores you want to use
```
Expand Down
5 changes: 2 additions & 3 deletions src/core/emu_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,8 @@ int32_t decode_exec(emu *chip8, options_config *config) {
case (0x33):
N1 = chip8->reg[X];
chip8->ram[(chip8->I) % RAM_SIZE] = N1 / 100;
chip8->ram[(chip8->I + 1) % RAM_SIZE] = N1 % (((chip8->ram[(chip8->I) % RAM_SIZE]) * 100)) / 10;
chip8->ram[(chip8->I + 2) % RAM_SIZE] = N1 % (((chip8->ram[(chip8->I) % RAM_SIZE]) * 100 +
(chip8->ram[(chip8->I + 1) % RAM_SIZE]) * 10));
chip8->ram[(chip8->I + 1) % RAM_SIZE] = (N1 % 100) / 10;
chip8->ram[(chip8->I + 2) % RAM_SIZE] = N1 % 10;
break;

case (0x55):
Expand Down
14 changes: 14 additions & 0 deletions src/gui/options_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,25 @@ int32_t options_window(options_config *config, ui_scale *scale) {

GuiColorPicker((Rectangle) {600, 175, 200, 200}, "TEXT", &config->pixel_color);

GuiCheckBox((Rectangle) {scale->button_x, GetScreenHeight() - (GetScreenHeight() / 3),
scale->button_width/8, scale->button_width/8}, "Show Debug info", &config->show_debug);

GuiCheckBox((Rectangle) {scale->button_x, GetScreenHeight() - (GetScreenHeight() / 2),
scale->button_width/8, scale->button_width/8}, "Show FPS", &config->show_fps);


if (GuiButton((Rectangle) {scale->button_x, GetScreenHeight() - (GetScreenHeight() / 6),
scale->button_width, scale->button_height},
GuiIconText(ICON_REREDO_FILL, "Return")) || IsKeyPressed(KEY_ESCAPE)) {
SetExitKey(KEY_ESCAPE);
return 0;
}

if (config->show_debug == true) {
SetTraceLogLevel(LOG_INFO);
} else {
SetTraceLogLevel(LOG_ERROR);
}

return 1;
}