Higher-level factory operations, ported from netmd-js's factory commands: bracketed reads and writes, firmware patching and raw UTOC sector access.
These manipulate device internals directly and can brick hardware. The patch/unpatch routines are the exploit machinery Web MiniDisc uses to unlock features; use them only with a known patch set.
Summary
Functions
Open, read and close a memory range in one call.
Open, write and close a memory range in one call.
Show text on the display, taking over from the default readout.
Install a firmware patch (method by Sir68k): redirect address to the
4-byte value using patch slot patch_number of total_patches.
Read a firmware patch slot, returning %{address: patched_address, data: value}.
Read a full 2352-byte UTOC sector from the disc-cache peripheral.
Remove a firmware patch installed with patch/6.
Write arbitrarily long data, split into 0x10-byte cleanWrites.
Write a full 2352-byte UTOC sector to the disc-cache peripheral.
Types
@type error() :: NetMD.Factory.error()
Functions
@spec clean_read( NetMD.Factory.t(), non_neg_integer(), non_neg_integer(), NetMD.Factory.memory_type(), keyword() ) :: {:ok, binary()} | error()
Open, read and close a memory range in one call.
With encrypted: true the range is opened encrypted and the result is
decrypted unless auto_decrypt: false.
@spec clean_write( NetMD.Factory.t(), non_neg_integer(), binary(), NetMD.Factory.memory_type(), keyword() ) :: :ok | error()
Open, write and close a memory range in one call.
With encrypted: true the data is encrypted before writing unless
auto_encrypt: false.
@spec display(NetMD.Factory.t(), String.t() | binary(), keyword()) :: :ok | error()
Show text on the display, taking over from the default readout.
@spec patch( NetMD.Factory.t(), non_neg_integer(), binary(), non_neg_integer(), non_neg_integer(), keyword() ) :: :ok | error()
Install a firmware patch (method by Sir68k): redirect address to the
4-byte value using patch slot patch_number of total_patches.
@spec read_patch(NetMD.Factory.t(), non_neg_integer(), keyword()) :: {:ok, %{address: non_neg_integer(), data: binary()}} | error()
Read a firmware patch slot, returning %{address: patched_address, data: value}.
@spec read_utoc_sector(NetMD.Factory.t(), non_neg_integer()) :: {:ok, binary()} | error()
Read a full 2352-byte UTOC sector from the disc-cache peripheral.
@spec unpatch(NetMD.Factory.t(), non_neg_integer(), non_neg_integer(), keyword()) :: :ok | error()
Remove a firmware patch installed with patch/6.
@spec write_of_any_length( NetMD.Factory.t(), non_neg_integer(), binary(), NetMD.Factory.memory_type(), keyword() ) :: :ok | error()
Write arbitrarily long data, split into 0x10-byte cleanWrites.
@spec write_utoc_sector(NetMD.Factory.t(), non_neg_integer(), binary()) :: :ok | error()
Write a full 2352-byte UTOC sector to the disc-cache peripheral.