WonderWitch/FreyaBIOS/Sound

From WSdev Wiki
Revision as of 08:20, 20 July 2024 by Asie (talk | contribs)
(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=$00 - sound_init

  • AH = $00

INT $15/AH=$01 - sound_set_channel

INT $15/AH=$02 - sound_get_channel

  • AH = $02

Return:

INT $15/AH=$03 - sound_set_output

INT $15/AH=$04 - sound_get_output

  • AH = $04

Return:

INT $15/AH=$05 - sound_set_wave

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

INT $15/AH=$06 - sound_set_pitch

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

INT $15/AH=$07 - sound_get_pitch

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

Return:

  • AX = Frequency divider (0 - 2047)

INT $15/AH=$08 - sound_set_volume

INT $15/AH=$09 - sound_get_volume

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

Return:

INT $15/AH=$0A - sound_set_sweep

INT $15/AH=$0B - sound_get_sweep

  • AH = $0B

Return:

INT $15/AH=$0C - sound_set_noise

INT $15/AH=$0D - sound_get_noise

  • AH = $0D

Return:

INT $15/AH=$0E - sound_get_random

  • AH = $0E

Return: