In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
AI stuff
Line 9: Line 9:  
{{hwstub}}
 
{{hwstub}}
 
{{yagcd}}
 
{{yagcd}}
 +
This is mainly taken from YAGCD. (Note: YAGCD reports the base address of AI as 0xCC006C00, because that is location of it on the GameCube. On the Wii it is 0xCD006C00.)
 +
The abbreviation for Audio Interface is AI.
 +
 +
== Registers ==
 +
{{reg32 | AI_CONTROL | addr = 0xCD006C00 | hifields = 1 | lofields = 8 |
 +
|16|
 +
|U |
 +
|  ||
 +
|9 |1    |1      |1      |1    |1      |1  |1    |
 +
|U |R/W  |R/W    |R/W    |R/W  |R/W    |R/W|R/W  |
 +
|  |RATE |SCRESET|AIINTVLD|AIINT|AIINTMSK|AFR|PSTAT|
 +
|}}
 +
{{regdesc
 +
|RATE|Sample Rate. Cleared is 32KHz, set is 32KHz. (A change from GC?)
 +
|SCRESET|Sample Counter Reset. Resets AI_AISCNT to 0.
 +
|AIINTVLD|This bit controls whether AIINT is affected by the AI_AIIT register matching AI_AISCNT. Once set, AIINT will hold its last value. If 0, match affects AIINT. If 1, AIINT holds last value.
 +
|AIINT|AI Interrupt Status and Clear. When read, holds the status of the AI Interrupt. If you set this bit, the Interrupt is cleared. The interrupt is generated when AIIT matches AI_AISCNT. Fires regardless of AIINTMSK.
 +
|AIINTMSK|AI Interrupt Mask. If 1, Interrupt is enabled. If 0, it is masked.
 +
|AFR|Auxiliary Frequency Register. Same values as RATE. Should only be changed when PSTAT is cleared.
 +
|PSTAT|Play status. 0 is stopped/paused, 1 is playing. This actually controls the AIS clock. This means that AI_AISCNT is increased only when PSTAT is 1.
 +
}}
 +
 +
{{reg32 | AI_VOLUME | addr = 0xCD006C04 | hifields = 1 | lofields = 2 |
 +
|16  |
 +
|U    |
 +
|    ||
 +
|8    |8    |
 +
|R/W  |R/W  |
 +
|AVRR |AVRL |
 +
|}}
 +
{{regdesc
 +
|AVRR|The Right channel's volume. 0x00 is Muted, 0xFF is full volume.
 +
|AVRL|The Left channel's volume. 0x00 is Muted, 0xFF is full volume.
 +
}}
 +
 +
{{reg32 | AI_AISCNT | addr = 0xCD006C08 | hifields = 1 | lofields = 1 |
 +
|16        |
 +
|R        |
 +
|AISCNT(H) ||
 +
|16        |
 +
|R        |
 +
|AISCNT(L) |
 +
|}}
 +
{{regdesc
 +
|AISCNT|Amount of samples played so far. Controlled with AI_CONTROL.
 +
}}
 +
{{reg32 | AI_AIIT | addr = 0xCD006C0C | hifields = 1 | lofields = 1 |
 +
|16      |
 +
|R/W    |
 +
|AIIT(H) ||
 +
|16      |
 +
|R/W    |
 +
|AIIT(L) |
 +
|}}
 +
{{regdesc
 +
|AIIT|AI Interrupt Timing. This register indicates the stereo sample count to issue an audio interface interrupt to the main processor. The interrupt is issued when the value of the AI_AISCNT register matches the content of this register.
 +
}}
508

edits

Navigation menu