mrcrowbar.lib.hardware.megadrive module

class mrcrowbar.lib.hardware.megadrive.SuperMagicDriveInterleave[source]

Bases: mrcrowbar.transforms.Transform

import_data(buffer, parent=None)[source]

Perform a reverse-transform on a byte string.

buffer
Source byte string.
parent
Parent object of the source (to provide context for Refs).
class mrcrowbar.lib.hardware.megadrive.VDPBlockMapping8(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
flip_horiz
flip_vert
palette_line
priority
tile_index
tile_index_high
tile_index_low
class mrcrowbar.lib.hardware.megadrive.VDPColour(source_data: common.BytesReadType | None = None, *, parent: Block | None = None, preload_attrs: dict[str, Any] | None = None, endian: EndianEncoding = None, cache_bytes: bool = False, path_hint: str | None = None, strict: bool = False, cache_refs: bool = True)[source]

Bases: mrcrowbar.lib.images.base.Colour

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.
strict
Throw an exception if parsing a BlockField fails, instead of logging a warning and returning an Unknown. Defaults to False.
cache_refs
Pre-cache all the Refs. Defaults to True.
b_8
b_raw
g_8
g_raw
r_8
r_raw