Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
spu [2024/07/01 11:27] – ↷ Page name changed from sound to spu adminspu [2025/02/08 17:48] (current) – [Beat interrupts] simer
Line 97: Line 97:
  
  
 +====== Beat interrupts ======
 +The SPU provides a beat interrupt which can be used to drive sequenced music tracks.
 +
 +Beat interrupts are enabled by writing to the enable bit (bit 15) of the beat count register (0x3405). 
 +
 +When enabled, the beat count will decrease at a regular rate governed by the beat base count register. When the beat count reaches zero, the beat interrupt will trigger IRQ4 in the CPU. The interrupt is acknowledged by writing 1 to the status bit (bit 14). The beat count is not automatically reset, instead the program should fill the beat count field with a new value.
 +
 +The beat base count register (0x3404) defines the rate in which the beat count is automatically decreased as ''(value / 70312.5) Hz'', or multiples of 14.2222... µs. The time until the next beat interrupt will be ''14.2222 µs * BeatCount * BeatBaseCount''.
  
spu.1719833233.txt.gz · Last modified: 2024/07/01 11:27 by admin
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0