Skip to Content
The Alchemy Project

src/sound/sdk/leftover_modulation_helpers.c

The older copies of the LFOS and MOD commands' helpers that the cartridge keeps with the leftover driver functions of leftover_driver.s, which alone call them: their bytes are those of clear_modM and ld_r3_tp_adr_i_unchecked (games/common/sdk/sound/modulation_helpers.c).

Functions

NameDescription
voidMusicTrackClearModulationStateLeftover (struct MusicPlayerInfo *player, struct MusicPlayerTrack *track)Unused: clear_modM's copy.
voidMusicTrackReadCommandByteLeftover (struct MusicPlayerInfo *player, struct MusicPlayerTrack *track)Unused: ld_r3_tp_adr_i_unchecked's copy.

Description

The older copies of the LFOS and MOD commands' helpers that the cartridge keeps with the leftover driver functions of leftover_driver.s, which alone call them: their bytes are those of clear_modM and ld_r3_tp_adr_i_unchecked (games/common/sdk/sound/modulation_helpers.c).

Functions in detail

MusicTrackClearModulationStateLeftover

void MusicTrackClearModulationStateLeftover(struct MusicPlayerInfo *player, struct MusicPlayerTrack *track)

Unused: clear_modM's copy. Stops the track's modulation: clears its output and phase and has its volume (or, for a pitch target, its pitch) worked out again.

Definition at line 12 of file leftover_modulation_helpers.c.

MusicTrackReadCommandByteLeftover

void MusicTrackReadCommandByteLeftover(struct MusicPlayerInfo *player, struct MusicPlayerTrack *track)

Unused: ld_r3_tp_adr_i_unchecked's copy. Reads the track's next command byte and moves its cursor past it, without an address check. It gives the byte back in r3, outside C's calling convention, and keeps r0 to r2 (r2 the byte's address) for its caller.

Definition at line 37 of file leftover_modulation_helpers.c.