aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h
index 5766565..048708b 100644
--- a/src/common.h
+++ b/src/common.h
@@ -14,6 +14,7 @@ WITH REGARD TO THIS SOFTWARE.
14 14
15#include "shorthand.h" 15#include "shorthand.h"
16 16
17#define CPU_FREQUENCY (2 << 23)
17// 18//
18// Memory sections. 19// Memory sections.
19// 20//
@@ -585,10 +586,11 @@ int bios_div(int num, int denom);
585#define SOUND_ENABLE_NOISE_RIGHT (1 << 0xF) 586#define SOUND_ENABLE_NOISE_RIGHT (1 << 0xF)
586 587
587typedef enum { 588typedef enum {
589 SOUND_DSOUND = (0x0 << 0),
588 SOUND_SQUARE1 = (0x1 << 0), 590 SOUND_SQUARE1 = (0x1 << 0),
589 SOUND_SQUARE2 = (0x1 << 1), 591 SOUND_SQUARE2 = (0x1 << 1),
590 SOUND_WAVE = (0x1 << 2), 592 SOUND_WAVE = (0x1 << 2),
591 SOUND_NOISE = (0x1 << 3), 593 SOUND_NOISE = (0x1 << 3),
592} SoundChannel; 594} SoundChannel;
593 595
594u16 596u16
@@ -613,6 +615,10 @@ sound_volume(SoundChannel channels, u8 volume) {
613#define SOUND_DSOUND_TIMER_B (1 << 0xE) 615#define SOUND_DSOUND_TIMER_B (1 << 0xE)
614#define SOUND_DSOUND_RESET_B (1 << 0xF) 616#define SOUND_DSOUND_RESET_B (1 << 0xF)
615 617
618// Direct sound FIFO queues.
619#define SOUND_FIFO_A ((u16*)(MEM_IO + 0xA0))
620#define SOUND_FIFO_B ((u16*)(MEM_IO + 0xA4))
621
616// Sound status bits. 622// Sound status bits.
617#define SOUND_ENABLE (1 << 0x7) 623#define SOUND_ENABLE (1 << 0x7)
618 624