This commit is contained in:
bnnm 2020-11-21 15:59:58 +01:00
parent 1c48be52d2
commit f6a87861fc
2 changed files with 64 additions and 2 deletions

View File

@ -278,6 +278,24 @@ simpler to make and cleaner: for example create a text file named `bgm01-loop.tx
and inside write `bgm01.mp3 #I 10.0 90.0`. Open the `.txtp` to play the `.mp3` and inside write `bgm01.mp3 #I 10.0 90.0`. Open the `.txtp` to play the `.mp3`
looping from 10 to 90 seconds. looping from 10 to 90 seconds.
#### OS case sensitiveness
When using OS with case sensitive filesystem (mainly Linux), a known issue with
companion files is that vgmstream generally tries to find them using lowercase
extension.
This means that if the developer used uppercase instead (e.g. `bgm.ABK`+`bgm.AST`)
loading will fail. It's technically complex to fix this, so for the time being
the only option is renaming the companion extension to lowercase.
A particularly nasty variation of that is that some formats load files by full
name (e.g. `STREAM.SS0`), but sometimes the actual filename is in other case
(`Stream.ss0`), and some files could even point to that with another case. You
could try adding *symlinks* in various upper/lower/mixed cases to handle this.
Currently there isn't any way to know what exact name is needed (other than
hex-editting), though only a few formats do this, mainly *Ubisoft* banks.
Regular formats without companion files should work fine in upper/lowercase.
### Decryption keys ### Decryption keys
Certain formats have encrypted data, and need a key to decrypt. vgmstream Certain formats have encrypted data, and need a key to decrypt. vgmstream
will try to find the correct key from a list, but it can be provided by will try to find the correct key from a list, but it can be provided by

View File

@ -440,9 +440,13 @@ While you can put anything in the values, this feature is meant to be used to st
#### BASE OFFSET MODIFIER #### BASE OFFSET MODIFIER
You can set a default offset that affects next `@(offset)` reads making them `@(offset + base_offset)`, for cleaner parsing (particularly interesting when combined with the `name_table`). You can set a default offset that affects next `@(offset)` reads making them `@(offset + base_offset)`, for cleaner parsing.
This is particularly interesting when combined with offsets to some long value. For example instead of `channels = @0x714` you could set `base_offset = 0x710, channels = @0x04`. Or values from the `name_table`, like `base_offset = name_value, channels = @0x04`.
It also allows parsing formats that set offsets to another offset, by "chaining" `base_offset`. With `base_offset = @0x10` (pointing to `0x40`) then `base_offset = @0x20`, it reads value at `0x60`. Set to 0 when you want to disable/reset the chain: `base_offset = @0x10` then `base_offset = 0` then `base_offset = @0x20` reads value at `0x20`
For example instead of `channels = @0x714` you could set `base_offset = 0x710, channels = @0x04`. Set to 0 when you want to disable it.
``` ```
base_offset = (value) base_offset = (value)
``` ```
@ -1052,3 +1056,43 @@ loop_flag = auto
#@0x10 is an absolute offset to another table, that shouldn't be affected by subsong_spacing #@0x10 is an absolute offset to another table, that shouldn't be affected by subsong_spacing
name_offset_absolute = @0x10 + 0x270 name_offset_absolute = @0x10 + 0x270
``` ```
#### Fatal Frame (Xbox) .mwa.txth
```
#00: MWAV
#04: flags?
#08: subsongs
#0c: data size
#10: null
#14: sizes offset
#18: offsets table
#1c: offset to tables?
#20: header offset
subsong_count = @0x08
# size table
subsong_spacing = 0
base_offset = 0
base_offset = @0x14
subsong_spacing = 0x04
data_size = @0x00
# offset table
subsong_spacing = 0
base_offset = 0
base_offset = @0x18
subsong_spacing = 0x04
start_offset = @0x00
# header (standard "fmt")
subsong_spacing = 0
base_offset = 0
base_offset = @0x20
channels = @0x02$2
sample_rate = @0x04
codec = XBOX
num_samples = data_size
#todo: there are dummy entries
```