From ab6fdd0347920cdcda9c4c3c9c3f01996adc48db Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Thu, 20 May 2021 22:18:28 +0200 Subject: Apply asie's first performance patch --- src/common.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/common.h') diff --git a/src/common.h b/src/common.h index 2859b11..e293770 100644 --- a/src/common.h +++ b/src/common.h @@ -666,7 +666,7 @@ typedef enum { NOTE_C_8 } Note; -const char * note_names[] = { +static const char * note_names[] = { "C2", "C#2", "D2", "D#2", "E2", "F2", "F#2", "G2", "G#2", "A2", "A#2", "B2", "C3", "C#3", "D3", "D#3", "E3", "F3", "F#3", "G3", "G#3", "A3", "A#3", "B3", "C4", "C#4", "D4", "D#4", "E4", "F4", "F#4", "G4", "G#4", "A4", "A#4", "B4", @@ -676,7 +676,7 @@ const char * note_names[] = { "C8" }; -const u32 sound_rates[] = { +static const u32 sound_rates[] = { 44 , 156 , 262 , 363 , 457 , 547 , 631 , 710 , 785 , 856 , 923 , 986 , 1046, 1102, 1155, 1205, 1252, 1297, 1339, 1379, 1416, 1452, 1485, 1517, 1547, 1575, 1601, 1626, 1650, 1672, 1693, 1713, 1732, 1750, 1766, 1782, @@ -704,4 +704,10 @@ wait_vsync(void) { #define MAX(A, B) ((A) >= (B) ? (A) : (B)) #define CLAMP(X, MIN, MAX) ((X) <= (MIN) ? (MIN) : (X) > (MAX) ? (MAX): (X)) +// IWRAM allocation macros for devkitARM. +#define IWRAM_CODE __attribute__((section(".iwram"), long_call, target("arm"))) +#define IWRAM_DATA __attribute__((section(".iwram"))) +#define EWRAM_DATA __attribute__((section(".ewram"))) +#define EWRAM_BSS __attribute__((section(".sbss"))) + #endif // GBAEXP_COMMON_H -- cgit v1.2.1