Difference between revisions of "DSP Binary"

From 3dbrew
Jump to navigation Jump to search
Line 28: Line 28:
 
| 0x10D
 
| 0x10D
 
| 1
 
| 1
| Special segment Mem type (0=1=0x1FF00000+,2=0x1FF40000+)
+
| Special segment Mem type (0=0x1FF00000+,1=0x1FEF8000+,2=0x1FF40000+,3=0x1FF60000+,4+ = errror)
 
|-
 
|-
 
| 0x10E
 
| 0x10E
Line 70: Line 70:
 
| 4
 
| 4
 
| 4
 
| 4
| Start addr in 16-bit words (must be < 0x20000 for type 0, < 0x10000 for type 1,2)
+
| Start addr in 16-bit words (must be < 0x20000 for type 0, < 0x10000 for type 1,2,3)
 
|-
 
|-
 
| 8
 
| 8
Line 78: Line 78:
 
| 15
 
| 15
 
| 1
 
| 1
| flags (Bit0 unk Bit1 memregion(0=0x1FF00000+,1=0x1FF40000+) Bit2-7 must be 0)
+
| Mem type (0=0x1FF00000+,1=0x1FEF8000+,2=0x1FF40000+,3=0x1FF60000+,4+ = errror)
 
|-
 
|-
 
| 16
 
| 16
Line 85: Line 85:
 
|}
 
|}
  
The normal ending of this files is *.cdc
+
The normal ending of this file type is *.cdc

Revision as of 15:02, 27 June 2014


Offset Size Description
0x0 0x100 RSA Signature
0x100 4 Magic ('DSP1')
0x104 4 DSP Binary size
0x108 2 Communication ports? (bits 0-7: ???, 8-15: ???) (ever bit represents a memory region the region is always 0x8000 Byte in size (the first region starts at 0x1ff00000 the next is a 0x1ff08000 and so on) .The control port is (u8*)(0x1ec40000 + bit position (for bit 0 it is 0x1ec40000 for bit 15 it is 0x1ec4000F)).
0x10C 1 ?
0x10D 1 Special segment Mem type (0=0x1FF00000+,1=0x1FEF8000+,2=0x1FF40000+,3=0x1FF60000+,4+ = errror)
0x10E 1 Num segments (must be 1..10)
0x10F 1 Flags (bit0=??, bit1=load special segment)
0x110 4 Special segment Start addr in 16-bit words
0x114 4 Special segment Size in bytes
0x118 8 Zero
0x120 0x30*10 Segment records

If "special segment" flag is set, 0x214 bytes are read from CfgS:GetConfigInfoBlk8 block 0x70000, and then copied to the special segment given. If the reading fails, zeroes are written in its place. The purpose of this segment is currently unknown.

Each segment record:

Offset Size Description
0 4 Offset data
4 4 Start addr in 16-bit words (must be < 0x20000 for type 0, < 0x10000 for type 1,2,3)
8 4 Size in bytes
15 1 Mem type (0=0x1FF00000+,1=0x1FEF8000+,2=0x1FF40000+,3=0x1FF60000+,4+ = errror)
16 32 SHA256 hash of segment

The normal ending of this file type is *.cdc