Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
spu [2025/02/07 20:27] – Beat interrupts simerspu [2025/02/08 17:48] (current) – [Beat interrupts] simer
Line 100: Line 100:
 The SPU provides a beat interrupt which can be used to drive sequenced music tracks. 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).+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. 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.+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''. 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.txt · Last modified: 2025/02/08 17:48 by simer
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0