Advertisement
TiniVi

BCWAV/BCSTM Notes

Jan 1st, 2015
1,631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. MAGIC: CWAV
  2. 0x0A: 01
  3. 0x0C: File Size
  4. 0x16: 00 70 (INFO)
  5. 0x1C: INFO Size
  6. 0x20: 01 70 (DATA)
  7. 0x24: DATA Size
  8.  
  9. MAGIC: CSTM
  10. 0x0A: 00
  11. 0x0C: File Size
  12. 0x14: 00 40 (INFO)
  13. 0x1C: INFO Size
  14. 0x20: 01 40 (SEEK) -Note: If SEEK isn't wanted, DATA can be placed here.
  15. 0x28: SEEK Size
  16. 0x2C: 02 40 (DATA)
  17. 0x34: DATA Size
  18.  
  19. ---------------------------------------------------------------------------------------------------------
  20. MAGIC: INFO
  21.  
  22. PCM16/PCM8:
  23.  
  24. BCWAV:
  25. 49 4E 46 4F II II 00 00 WW VV 00 00 XX XX 00 00
  26. YY YY 00 00 ZZ ZZ ZZ ZZ 00 00 00 00 NN NN 00 00
  27. 00 71 00 00 14 00 00 00 00 71 00 00 28 00 00 00
  28. 00 1F 00 00 18 00 00 00 00 00 00 00 FF FF FF FF
  29. 00 00 00 00 00 1F 00 00 PP PP PP PP 00 00 00 00
  30. FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00
  31.  
  32. 0x04: INFO Size (I)
  33. 0x08: Type (W)
  34. 0x09: Enables Loop, if loop is present and this is not enabled, song will only loop once and play to end. (V)
  35. 0x0C: Sample Rate (X)
  36. 0x10: 01 if looped, but byte doesn't do anything. (Y)
  37. 0x14: Sample Count (Z)
  38. 0x1C: Channel Count (N)
  39. 0x48: Pointer to second channel (P)
  40.  
  41. BCSTM:
  42. 49 4E 46 4F II II 00 00 00 41 00 00 18 00 00 00
  43. 01 01 00 00 50 00 00 00 01 01 00 00 5C 00 00 00
  44. WW VV NN NN XX XX 00 00 YY YY 00 00 ZZ ZZ ZZ ZZ
  45. ?? ?? 00 00 00 20 00 00 00 10 00 00 ?? ?? ?? ??
  46. ?? ?? ?? ?? ?? ?? ?? ?? 04 00 00 00 00 10 00 00
  47. 00 1F 00 00 18 00 00 00 01 00 00 00 01 41 00 00
  48. 20 00 00 00 02 00 00 00 02 41 00 00 28 00 00 00
  49. 02 41 00 00 30 00 00 00 7F 40 00 00 00 01 00 00
  50. 0C 00 00 00 02 00 00 00 00 01 00 00 00 00 00 00
  51.  
  52. 0x04: INFO Size (I)
  53. 0x20: Type (W)
  54. 0x21: Enables Loop, if loop is present and this is not enabled, song will only loop once and play to end. (V)
  55. 0x22: Channel Count (N)
  56. 0x24: Sample Rate (X)
  57. 0x28: 01 if looped, but byte doesn't do anything. (Y)
  58. 0x2C: Sample Count (Z)
  59.  
  60. ---------------------------------------------------------------------------------------------------------
  61. MAGIC: DATA
  62. 0x04: DATA Size (Same as above)
  63. 0x20: Channel 1 Starts
  64. 0x2020: DATA Sections for BCSTM and BCWAV are different starting here.
  65.  
  66. DATA for BCSTM and BCWAV are not 1:1, Channels are stored differently.
  67.  
  68. BCWAV BCSTM SIZE Channel
  69. 0x20 0x20 0x2000 01
  70. 0x2020 0x4020 0x2000 01
  71. 0x4020 0x8020 0x2000 01
  72. 0x6020 0xC020 0x2000 01
  73. 0x8020 0xE020 0x2000 01
  74.  
  75. Channel 2 starts after Channel 1 in the BCWAV.
  76. For BCSTM, Channel 2 starts at 0x2020 for 0x2000 bytes, then at 0x6020 it continues, and so on.
  77. 1 0x2000 > 2 0x2000 >1 0x2000 > 2 0x2000 > etc...
  78.  
  79. Note: Multiple Streams in a BCSTM translate to more channels, the 3ds will call to specific channels if needed.
  80. For example, if there are two streams, each with 2 channels. Channel count will be 4.
  81. It works the same as 2 channels, 1 0x2000 > 2 0x2000 > 3 0x2000 > 4 0x2000 > 1 0x2000 > 2 0x2000 > 3 0x2000 > 4 0x2000 > etc...
  82. If you want to replace said channels, they have to be in the same order.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement