mrcrowbar.lib.audio.vgm module¶
-
class
mrcrowbar.lib.audio.vgm.
Blank
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
property
repr
¶ Plaintext summary of the Block.
-
class
mrcrowbar.lib.audio.vgm.
Command
¶ Bases:
enum.IntEnum
An enumeration.
-
DATA_BLOCK
= 103¶
-
END_OF_DATA
= 102¶
-
GG_STEREO
= 79¶
-
MEMORY_WRITE
= 104¶
-
RESERVED_30
= 48¶
-
RESERVED_31
= 49¶
-
RESERVED_32
= 50¶
-
RESERVED_33
= 51¶
-
RESERVED_34
= 52¶
-
RESERVED_35
= 53¶
-
RESERVED_36
= 54¶
-
RESERVED_37
= 55¶
-
RESERVED_38
= 56¶
-
RESERVED_39
= 57¶
-
RESERVED_3A
= 58¶
-
RESERVED_3B
= 59¶
-
RESERVED_3C
= 60¶
-
RESERVED_3D
= 61¶
-
RESERVED_3E
= 62¶
-
RESERVED_3F
= 63¶
-
RESERVED_40
= 64¶
-
RESERVED_41
= 65¶
-
RESERVED_42
= 66¶
-
RESERVED_43
= 67¶
-
RESERVED_44
= 68¶
-
RESERVED_45
= 69¶
-
RESERVED_46
= 70¶
-
RESERVED_47
= 71¶
-
RESERVED_48
= 72¶
-
RESERVED_49
= 73¶
-
RESERVED_4A
= 74¶
-
RESERVED_4B
= 75¶
-
RESERVED_4C
= 76¶
-
RESERVED_4D
= 77¶
-
RESERVED_4E
= 78¶
-
RESERVED_A1
= 161¶
-
RESERVED_A2
= 162¶
-
RESERVED_A3
= 163¶
-
RESERVED_A4
= 164¶
-
RESERVED_A5
= 165¶
-
RESERVED_A6
= 166¶
-
RESERVED_A7
= 167¶
-
RESERVED_A8
= 168¶
-
RESERVED_A9
= 169¶
-
RESERVED_AA
= 170¶
-
RESERVED_AB
= 171¶
-
RESERVED_AC
= 172¶
-
RESERVED_AD
= 173¶
-
RESERVED_AE
= 174¶
-
RESERVED_AF
= 175¶
-
RESERVED_C5
= 197¶
-
RESERVED_C6
= 198¶
-
RESERVED_C7
= 199¶
-
RESERVED_C8
= 200¶
-
RESERVED_C9
= 201¶
-
RESERVED_CA
= 202¶
-
RESERVED_CB
= 203¶
-
RESERVED_CC
= 204¶
-
RESERVED_CD
= 205¶
-
RESERVED_CE
= 206¶
-
RESERVED_CF
= 207¶
-
RESERVED_D5
= 213¶
-
RESERVED_D6
= 214¶
-
RESERVED_D7
= 215¶
-
RESERVED_D8
= 216¶
-
RESERVED_D9
= 217¶
-
RESERVED_DA
= 218¶
-
RESERVED_DB
= 219¶
-
RESERVED_DC
= 220¶
-
RESERVED_DD
= 221¶
-
RESERVED_DE
= 222¶
-
RESERVED_DF
= 223¶
-
RESERVED_E1
= 225¶
-
RESERVED_E2
= 226¶
-
RESERVED_E3
= 227¶
-
RESERVED_E4
= 228¶
-
RESERVED_E5
= 229¶
-
RESERVED_E6
= 230¶
-
RESERVED_E7
= 231¶
-
RESERVED_E8
= 232¶
-
RESERVED_E9
= 233¶
-
RESERVED_EA
= 234¶
-
RESERVED_EB
= 235¶
-
RESERVED_EC
= 236¶
-
RESERVED_ED
= 237¶
-
RESERVED_EE
= 238¶
-
RESERVED_EF
= 239¶
-
RESERVED_F0
= 240¶
-
RESERVED_F1
= 241¶
-
RESERVED_F2
= 242¶
-
RESERVED_F3
= 243¶
-
RESERVED_F4
= 244¶
-
RESERVED_F5
= 245¶
-
RESERVED_F6
= 246¶
-
RESERVED_F7
= 247¶
-
RESERVED_F8
= 248¶
-
RESERVED_F9
= 249¶
-
RESERVED_FA
= 250¶
-
RESERVED_FB
= 251¶
-
RESERVED_FC
= 252¶
-
RESERVED_FD
= 253¶
-
RESERVED_FE
= 254¶
-
RESERVED_FF
= 255¶
-
SN76489
= 80¶
-
WAIT
= 97¶
-
WAIT_1
= 112¶
-
WAIT_10
= 121¶
-
WAIT_11
= 122¶
-
WAIT_12
= 123¶
-
WAIT_13
= 124¶
-
WAIT_14
= 125¶
-
WAIT_15
= 126¶
-
WAIT_16
= 127¶
-
WAIT_2
= 113¶
-
WAIT_3
= 114¶
-
WAIT_4
= 115¶
-
WAIT_5
= 116¶
-
WAIT_6
= 117¶
-
WAIT_7
= 118¶
-
WAIT_735_60HZ
= 98¶
-
WAIT_8
= 119¶
-
WAIT_882_50HZ
= 99¶
-
WAIT_9
= 120¶
-
Y8950
= 92¶
-
YM2151
= 84¶
-
YM2203
= 85¶
-
YM2413
= 81¶
-
YM2608_0
= 86¶
-
YM2608_1
= 87¶
-
YM2610_0
= 88¶
-
YM2610_1
= 89¶
-
YM2612_0
= 82¶
-
YM2612_0_2A_WAIT_0
= 128¶
-
YM2612_0_2A_WAIT_1
= 129¶
-
YM2612_0_2A_WAIT_10
= 138¶
-
YM2612_0_2A_WAIT_11
= 139¶
-
YM2612_0_2A_WAIT_12
= 140¶
-
YM2612_0_2A_WAIT_13
= 141¶
-
YM2612_0_2A_WAIT_14
= 142¶
-
YM2612_0_2A_WAIT_15
= 143¶
-
YM2612_0_2A_WAIT_2
= 130¶
-
YM2612_0_2A_WAIT_3
= 131¶
-
YM2612_0_2A_WAIT_4
= 132¶
-
YM2612_0_2A_WAIT_5
= 133¶
-
YM2612_0_2A_WAIT_6
= 134¶
-
YM2612_0_2A_WAIT_7
= 135¶
-
YM2612_0_2A_WAIT_8
= 136¶
-
YM2612_0_2A_WAIT_9
= 137¶
-
YM2612_1
= 83¶
-
YM3526
= 91¶
-
YM3812
= 90¶
-
YMF262_0
= 94¶
-
YMF262_1
= 95¶
-
YMZ280B
= 93¶
-
-
class
mrcrowbar.lib.audio.vgm.
DataBlock
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
compat_stop
= <UInt8: offset=0x0>¶
-
data
= <Bytes: offset=0x6, length=<Ref: length (rw)>>¶
-
data_type
= <UInt8: offset=0x1>¶
-
length
= <UInt32_LE: offset=0x2>¶
-
class
mrcrowbar.lib.audio.vgm.
MemoryWrite
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
chip_type
= <UInt8: offset=0x1>¶
-
compat_stop
= <UInt8: offset=0x0>¶
-
length
= <UInt24_LE: offset=0x8>¶
-
read_offset
= <UInt24_LE: offset=0x2>¶
-
write_offset
= <UInt24_LE: offset=0x5>¶
-
class
mrcrowbar.lib.audio.vgm.
PSGData
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
property
channel
¶
-
property
control
¶
-
property
data
¶
-
data_raw
= <Bits: offset=0x0, bits=0b1111111>¶
-
property
repr
¶ Plaintext summary of the Block.
-
type
= <Bits: offset=0x0, bits=0b10000000>¶
-
class
mrcrowbar.lib.audio.vgm.
RegisterWrite8
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
register
= <UInt8: offset=0x0>¶
-
property
repr
¶ Plaintext summary of the Block.
-
value
= <UInt8: offset=0x0>¶
-
class
mrcrowbar.lib.audio.vgm.
Reserved16
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
unk1
= <UInt8: offset=0x0>¶
-
unk2
= <UInt8: offset=0x1>¶
-
class
mrcrowbar.lib.audio.vgm.
Reserved24
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
unk1
= <UInt8: offset=0x0>¶
-
unk2
= <UInt8: offset=0x1>¶
-
unk3
= <UInt8: offset=0x2>¶
-
class
mrcrowbar.lib.audio.vgm.
Reserved32
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
unk1
= <UInt8: offset=0x0>¶
-
unk2
= <UInt8: offset=0x1>¶
-
unk3
= <UInt8: offset=0x2>¶
-
unk4
= <UInt8: offset=0x3>¶
-
class
mrcrowbar.lib.audio.vgm.
Reserved8
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
unk1
= <UInt8: offset=0x0>¶
-
class
mrcrowbar.lib.audio.vgm.
VGM150
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
eof_offset
= <UInt32_LE: offset=0x4>¶
-
extra
= <Bytes: offset=<EndOffset: vgm_data (rw)>>¶
-
gd3_offset
= <UInt32_LE: offset=0x14>¶
-
header_extra
= <Bytes: offset=0x38, length=8, default=b'\x00\x00\x00\x00\x00\x00\x00\x00'>¶
-
loop_offset
= <UInt32_LE: offset=0x1c>¶
-
loop_sample_count
= <UInt32_LE: offset=0x20>¶
-
magic
= <Bytes: offset=0x0, length=4, default=b'Vgm '>¶
-
rate
= <UInt32_LE: offset=0x24>¶
-
sn76489_clock
= <UInt32_LE: offset=0xc>¶
-
sn76489_feedback
= <UInt16_LE: offset=0x28>¶
-
sn76489_flags
= <UInt8: offset=0x2b>¶
-
sn76489_shiftwidth
= <UInt8: offset=0x2a>¶
-
total_sample_count
= <UInt32_LE: offset=0x18>¶
-
version
= <UInt32_LE: offset=0x8>¶
-
vgm_data
= <ChunkField: 0x00000000f5f955b0>¶
-
property
vgm_data_offset
¶
-
vgm_data_offset_raw
= <UInt32_LE: offset=0x34>¶
-
ym2151_clock
= <UInt32_LE: offset=0x30>¶
-
ym2413_clock
= <UInt32_LE: offset=0x10>¶
-
ym2612_clock
= <UInt32_LE: offset=0x2c>¶
-
class
mrcrowbar.lib.audio.vgm.
Write16
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
property
repr
¶ Plaintext summary of the Block.
-
value
= <UInt16_LE: offset=0x0>¶
-
class
mrcrowbar.lib.audio.vgm.
Write8
(source_data=None, parent=None, preload_attrs=None, endian=None, cache_bytes=False, path_hint=None)[source]¶ Bases:
mrcrowbar.blocks.Block
Base class for Blocks.
- source_data
Source data to construct Block with. Can be a byte string, dictionary of attribute: value pairs, or another Block object.
- parent
Parent Block object where this Block is defined. Used for e.g. evaluating Refs.
- preload_attrs
Attributes on the Block to set before importing the data. Used for linking in dependencies before loading.
- endian
Platform endianness to use when interpreting the Block data. Useful for Blocks which have the same data layout but different endianness for stored numbers. Has no effect on fields with an predefined endianness.
- cache_bytes
Cache the bytes equivalent of the Block. Useful for debugging the loading procedure. Defaults to False.
- path_hint
Cache a string containing the path of the current Block, relative to the root.
-
property
repr
¶ Plaintext summary of the Block.
-
value
= <UInt8: offset=0x0>¶