From 027f63aee19840ac1bf571a5d00d7758ca517220 Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Wed, 29 May 2024 12:44:37 -0700 Subject: [PATCH 1/3] Fix building for clang --- source/quickerNES/core/cpu.cpp | 5 ----- source/quickerNES/core/cpu.hpp | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/quickerNES/core/cpu.cpp b/source/quickerNES/core/cpu.cpp index af12954..37632aa 100644 --- a/source/quickerNES/core/cpu.cpp +++ b/source/quickerNES/core/cpu.cpp @@ -222,10 +222,6 @@ uint8_t clock_table [256] = { 3,5,2,8,4,4,6,6,2,4,2,7,4,4,7,7 // F }; -// This optimization is only possible with the GNU compiler -- MSVC does not allow function alignment -#ifdef __GNUC__ -__attribute__((optimize("align-functions=1024"))) -#endif Cpu::result_t Cpu::run ( nes_time_t end ) { set_end_time_( end ); @@ -1175,7 +1171,6 @@ end: r.status = temp; } - this->clock_count = clock_count; r.pc = pc; r.sp = GET_SP(); r.a = a; diff --git a/source/quickerNES/core/cpu.hpp b/source/quickerNES/core/cpu.hpp index 4b2a798..60930b4 100644 --- a/source/quickerNES/core/cpu.hpp +++ b/source/quickerNES/core/cpu.hpp @@ -84,7 +84,12 @@ class Cpu result_badop // unimplemented/illegal instruction }; + // This optimization is only possible with the GNU compiler -- MSVC does not allow function alignment +#if defined(__GNUC__) || defined(__clang__) + result_t run(nes_time_t end_time) __attribute__((aligned(1024))); +#else result_t run(nes_time_t end_time); +#endif nes_time_t time() const { return clock_count; } From dc13ff638cf43b819aad87890aedf72bd65bf360 Mon Sep 17 00:00:00 2001 From: SergioMartin86 Date: Sun, 11 Aug 2024 14:45:05 +0200 Subject: [PATCH 2/3] Forcing specific numbers for emum --- source/quickerNES/core/core.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/quickerNES/core/core.hpp b/source/quickerNES/core/core.hpp index 18c68bc..afc13fb 100644 --- a/source/quickerNES/core/core.hpp +++ b/source/quickerNES/core/core.hpp @@ -105,10 +105,10 @@ class Core : private Cpu // APU and Joypad enum controllerType_t { - none_t, - joypad_t, - arkanoidNES_t, - arkanoidFamicom_t, + none_t = 0, + joypad_t = 1, + arkanoidNES_t = 2, + arkanoidFamicom_t = 3, }; Core() : ppu(this) From 61ff28710c44b75c170dff1ee8f89831296e34b5 Mon Sep 17 00:00:00 2001 From: SergioMartin86 Date: Sun, 11 Aug 2024 15:08:18 +0200 Subject: [PATCH 3/3] Updating jaffarCommon --- extern/jaffarCommon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/jaffarCommon b/extern/jaffarCommon index e7fd15b..a536b50 160000 --- a/extern/jaffarCommon +++ b/extern/jaffarCommon @@ -1 +1 @@ -Subproject commit e7fd15b6e3ffed9bd718c0bfc0b0a6247e5dfe76 +Subproject commit a536b508da2b3915aaee52702e8d90c082f02652