From 5624f29ee6ec65c85e0649b92d9ee0ec4ff92c9b Mon Sep 17 00:00:00 2001 From: Sergio Martin Date: Sun, 14 Jan 2024 17:44:54 +0100 Subject: [PATCH] Changing alignment value to 1K, which seems sufficient and doesnt alienate other functions --- meson_options.txt | 2 +- source/core/Nes_Cpu.cpp | 19 +++++++++---------- source/core/meson.build | 1 - source/core/nes_data.cpp | 10 ---------- 4 files changed, 10 insertions(+), 22 deletions(-) delete mode 100644 source/core/nes_data.cpp diff --git a/meson_options.txt b/meson_options.txt index 86af9d9..88c694e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -8,7 +8,7 @@ option('buildTests', option('CPUFunctionAlignment', type : 'integer', min : 1, - value : 4096, + value : 1024, description : '''Indicates the alignment for the main emulator CPU function. This is a large function that may cross page boundaries, which impacts performance. We recommend setting this value for the architecture own page size. diff --git a/source/core/Nes_Cpu.cpp b/source/core/Nes_Cpu.cpp index 185b2d9..64a49db 100644 --- a/source/core/Nes_Cpu.cpp +++ b/source/core/Nes_Cpu.cpp @@ -19,6 +19,15 @@ more details. You should have received a copy of the GNU Lesser General Public License along with this module; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define st_n 0x80 +#define st_v 0x40 +#define st_r 0x20 +#define st_b 0x10 +#define st_d 0x08 +#define st_i 0x04 +#define st_z 0x02 +#define st_c 0x01 + // Macros #define GET_OPERAND( addr ) page [addr] @@ -198,16 +207,6 @@ void Nes_Cpu::write( nes_addr_t addr, int value ) // status flags -enum { - st_n = 0x80, - st_v = 0x40, - st_r = 0x20, - st_b = 0x10, - st_d = 0x08, - st_i = 0x04, - st_z = 0x02, - st_c = 0x01, -}; constexpr uint8_t clock_table [256] = { // 0 1 2 3 4 5 6 7 8 9 A B C D E F diff --git a/source/core/meson.build b/source/core/meson.build index 8d0d90c..e8eed15 100644 --- a/source/core/meson.build +++ b/source/core/meson.build @@ -15,7 +15,6 @@ quickerNESCoreSrc = [ 'Effects_Buffer.cpp', 'Nes_State.cpp', 'emu2413.cpp', - 'nes_data.cpp', 'nes_util.cpp', 'emu2413_state.cpp', 'Nes_Effects_Buffer.cpp', diff --git a/source/core/nes_data.cpp b/source/core/nes_data.cpp deleted file mode 100644 index 09c3037..0000000 --- a/source/core/nes_data.cpp +++ /dev/null @@ -1,10 +0,0 @@ - -// Nes_Emu 0.7.0. http://www.slack.net/~ant/ - -#include "nes_data.h" - - - -#include "blargg_source.h" - -