Skip to Content
The Alchemy Project

include/sdk_config.h

What The Broken Seal sets for the development kit's code in games/common/sdk: where the sound driver's jump table and mixer sit in RAM, and the sound mode the driver starts in. More…

Macros

NameDescription
#defineRamMPlayJumpTableThe sound driver's jump table, MPlayJumpTable, at its fixed address, the first EWRAM after the sound work: the driver's core (driver.c) reaches it by this number, MPlayExtender by its name.
#defineRamSoundMixer FIXED_ADDRESS((Uint8 *), 0x03007000, SoundMainRAM)The sound driver's mixer, SoundMainRAM, 932 bytes, where the linker script places .iwram_mixer. m4aSoundInit copies SOUND_MIXER_CODE_SIZE (1 KB) there at once, so the 92 bytes after the mixer in the ROM land just after it.
#defineSOUND_GAME_MODE 0x0097F800The sound mode m4aSoundInit sets for the whole game: 8 PCM notes (bits 11..8), volume 15 (15..12), rate 7 (19..16), 352 samples a frame or 21024 a second, and sound bias resolution 1 (from bits 23..20).

Variables

NameDescription
extern Uint8SoundMainRAM []

Description

What The Broken Seal sets for the development kit's code in games/common/sdk: where the sound driver's jump table and mixer sit in RAM, and the sound mode the driver starts in. The kit's C takes each as a number: written as a linked name, old_agbcc builds other code.

Macros in detail

RamMPlayJumpTable

#define RamMPlayJumpTable

The sound driver's jump table, MPlayJumpTable, at its fixed address, the first EWRAM after the sound work: the driver's core (driver.c) reaches it by this number, MPlayExtender by its name.

Definition at line 18 of file sdk_config.h.

RamSoundMixer

#define RamSoundMixer FIXED_ADDRESS((Uint8 *), 0x03007000, SoundMainRAM)

The sound driver's mixer, SoundMainRAM, 932 bytes, where the linker script places .iwram_mixer. m4aSoundInit copies SOUND_MIXER_CODE_SIZE (1 KB) there at once, so the 92 bytes after the mixer in the ROM land just after it.

Definition at line 24 of file sdk_config.h.

SOUND_GAME_MODE

#define SOUND_GAME_MODE 0x0097F800

The sound mode m4aSoundInit sets for the whole game: 8 PCM notes (bits 11..8), volume 15 (15..12), rate 7 (19..16), 352 samples a frame or 21024 a second, and sound bias resolution 1 (from bits 23..20).

Definition at line 29 of file sdk_config.h.

Variables in detail

SoundMainRAM

extern Uint8 SoundMainRAM[]

Definition at line 12 of file sdk_config.h.