Difference between revisions of "DSP Memory Region"

From 3dbrew
Jump to navigation Jump to search
m
Line 4: Line 4:
  
  
The DSP communicates with userland through memory locations 0x1ff40000-0x1ff77fff. Within this region are two areas of structures that are exact duplicates of each other. The DSP alternates between the use of these two areas (much like a double-buffer). Each area has 15 structures within it. The location of these structures can be obtained by [[DSP:ReadPipe|reading pipe 2]].
+
The DSP communicates with userland through memory locations 0x1ff40000-0x1ff77fff. Within this region are two areas of structures that are exact duplicates of each other. The DSP alternates between the use of these two areas (much like a double-buffer). Each area has 15 structures within it. The location of these structures can be obtained by [[DSP:ReadPipe|reading channel 2 of the DSP pipe]].
  
 
The mixer has 24 channels, each of which are individually configurable.
 
The mixer has 24 channels, each of which are individually configurable.

Revision as of 16:47, 16 February 2016

Some of this is known to be incorrect. I'll correct this in a few months after a bit more RE work. Merry (talk) 21:10, 28 January 2016 (CET)



The DSP communicates with userland through memory locations 0x1ff40000-0x1ff77fff. Within this region are two areas of structures that are exact duplicates of each other. The DSP alternates between the use of these two areas (much like a double-buffer). Each area has 15 structures within it. The location of these structures can be obtained by reading channel 2 of the DSP pipe.

The mixer has 24 channels, each of which are individually configurable.

Structure Number DSP memory address Size Description
5 0x8400 0x20 Status (?)
9 0x8410 0x260 Debug (?)
6 0x8540 0x280 Loopback Samples (PCM16)
2 0x8680 0x120 Channel Status (x24)
8 0x9710 0x1A40 ?
4 0x9430 0xC4 Main Configuration
7 0x9492 0x1400 ?
1 0x9e92 0x1200 Channel Config (x24)
3 0x9430 0x300 GC-ADPCM Coefficients (x24)
10 0xa912 0x200
11 0xaa12 0x180
12 0xaad2 0x300
13 0xac52 0x14
14 0xac5c 0x2476 -
0 0xbfff 0x2 Frame Counter

Channel Config

A 192 byte long structure. There are 24 of them.

Offset Type Description
0 u32 Dirty flags
4 70 bytes TODO
74 u16 Bitmap of which buffers in queue are dirty
76 Buffer[4] Buffer queue
156 u32 -
160 u16 Is Active
162 u16 Sync Count
164 8 TODO
172 u32 Physical address of current buffer
176 u32 Number of samples in current buffer
180 u16 bits[0:1]: 1 = mono, 2 = stereo; bits[2:3]: buffer format
182 u16 ADPCM predictor
184 s16 ADPCM yn1
186 s16 ADPCM yn2
188 u16 bit[0]: Has ADPCM data?; bit[1]: Is looping?
190 u16 Buffer Id of this current buffer

Buffer

Offset Type Description
0 u32 Physical Address
4 u32 Sample Count
8 u16 ADPCM P/S
10 s16[2] ADPCM yn[1,2]
14 u8 Has ADPCM?
15 u8 Looping?
16 u16 Buffer Id
18 u16 -

Dirty Bits

Bit What Changed
3 ADPCM Coefficients
5 Embedded buffer
13 Is Active
18 Interpolation Type
19 Rate
20 Buffer Queue
22 Embedded buffer
23 IRR Filter Type
25 Sync Count
26-28 Mix
30 First time init
31 Embedded Buffer