WonderWitch/FreyaBIOS/Sound

From WSdev Wiki
Revision as of 08:18, 20 July 2024 by Asie (talk | contribs) (Created page with "The Sound interrupt provides an abstraction layer for the WonderSwan's sound hardware. == Interrupts == === INT 15/AH=00h - sound_init === * AH = 00h === INT 15/AH=01h - sound_set_channel === * AH = 01h * BL = Channel Control value === INT 15/AH=02h - sound_get_channel === * AH = 02h Return: * AL = Channel Control value === INT 15/AH=03h - sound_set_output === * AH = 03h * BL = Sound#S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The Sound interrupt provides an abstraction layer for the WonderSwan's sound hardware.

Interrupts

INT 15/AH=00h - sound_init

  • AH = 00h

INT 15/AH=01h - sound_set_channel

INT 15/AH=02h - sound_get_channel

  • AH = 02h

Return:

INT 15/AH=03h - sound_set_output

INT 15/AH=04h - sound_get_output

  • AH = 04h

Return:

INT 15/AH=05h - sound_set_wave

  • AH = 05h
  • AL = Channel (0, 1, 2, 3)
  • DS:DX = Pointer to waveform data (16 bytes)

INT 15/AH=06h - sound_set_pitch

  • AH = 06h
  • AL = Channel (0, 1, 2, 3)
  • BX = Frequency divider (0 - 2047)

INT 15/AH=07h - sound_get_pitch

  • AH = 07h
  • AL = Channel (0, 1, 2, 3)

Return:

  • AX = Frequency divider (0 - 2047)

INT 15/AH=08h - sound_set_volume

INT 15/AH=09h - sound_get_volume

  • AH = 09h
  • AL = Channel (0, 1, 2, 3)

Return:

INT 15/AH=0Ah - sound_set_sweep

INT 15/AH=0Bh - sound_get_sweep

  • AH = 0Bh

Return:

INT 15/AH=0Ch - sound_set_noise

INT 15/AH=0Dh - sound_get_noise

  • AH = 0Dh

Return:

INT 15/AH=0Eh - sound_get_random

  • AH = 0Eh

Return: