summaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h
index b688711..d78f11a 100644
--- a/src/common.h
+++ b/src/common.h
@@ -105,7 +105,7 @@ rgb15(u32 red, u32 green, u32 blue ) {
105#define COLOR_RED rgb15(31, 0, 12) 105#define COLOR_RED rgb15(31, 0, 12)
106#define COLOR_BLUE rgb15(2, 15, 30) 106#define COLOR_BLUE rgb15(2, 15, 30)
107#define COLOR_CYAN rgb15(0, 30, 30) 107#define COLOR_CYAN rgb15(0, 30, 30)
108#define COLOR_GREY rgb15(4, 4, 4) 108#define COLOR_GREY rgb15(12, 12, 12)
109#define COLOR_BLACK rgb15(0, 0, 0) 109#define COLOR_BLACK rgb15(0, 0, 0)
110#define COLOR_WHITE rgb15(28, 28, 28) 110#define COLOR_WHITE rgb15(28, 28, 28)
111 111
@@ -594,9 +594,14 @@ sound_volume(SoundChannel channels, u8 volume) {
594#define SOUND_SQUARE_LEN(N) (N) 594#define SOUND_SQUARE_LEN(N) (N)
595#define SOUND_SQUARE_DUTY(N) ((N) << 0x6) 595#define SOUND_SQUARE_DUTY(N) ((N) << 0x6)
596#define SOUND_SQUARE_ENV_TIME(N) ((N) << 0x8) 596#define SOUND_SQUARE_ENV_TIME(N) ((N) << 0x8)
597#define SOUND_SQUARE_ENV_INC(N) ((N) << 0xB) 597#define SOUND_SQUARE_ENV_DIR(N) ((N) << 0xB)
598#define SOUND_SQUARE_ENV_VOL(N) ((N) << 0xC) 598#define SOUND_SQUARE_ENV_VOL(N) ((N) << 0xC)
599 599
600// DMG square 1 sweep control bits.
601#define SOUND_SWEEP_NUMBER(N) (N)
602#define SOUND_SWEEP_DIR(N) ((N) << 0x3)
603#define SOUND_SWEEP_TIME(N) ((N) << 0x4)
604
600// DMG square frequency bits. 605// DMG square frequency bits.
601#define SOUND_SQUARE_TIMED (1 << 0xE) 606#define SOUND_SQUARE_TIMED (1 << 0xE)
602#define SOUND_SQUARE_RESET (1 << 0xF) 607#define SOUND_SQUARE_RESET (1 << 0xF)