Skip to content

Instantly share code, notes, and snippets.

@coderjo
coderjo / map2dmtable.py
Created September 26, 2019 09:46
Quick Python script to generate a linux device mapper table from a ddrescue map file, placing errors where ddrescue had bad blocks.
#!/usr/bin/env python
import argparse
parser = argparse.ArgumentParser(description='Create a device mapper table from a ddrescue map file. '
'Blocks that are marked as bad will be mapped to the error target, while successfully-read '
'blocks will be passed through to the device. The dm table will be written to stdout so it can '
'be piped directly into dmsetup.')
parser.add_argument('mapfile', help='The ddrescue map file to convert')
parser.add_argument('device', help='The device containing the image that corresponds to the map file. (typically a loop device)')
@coderjo
coderjo / m4b-format.md
Last active October 16, 2020 02:13
Myst IV: Revelation .m4b pack file format

Endian order: little endian

FILE HEADER

Type Count Description
uint32 0x1 Signature string length = 0x0b
char 0xb Signature string = "UBI_BF_SIG" + 0x0
uint32 0x1 file format version? = 0x1
uint32 0x1 unknown = 0x0
@coderjo
coderjo / LD-V4300D Service Adaptor.txt
Created May 5, 2020 22:59
LD-V4300D Service Adaptor BOM
Source: C:/projects/ldstuff/LD-V4300D-Service-Adaptor/LD-V4300D Service Adaptor.sch
Date: 5/5/2020 6:58:50 PM
Tool: Eeschema 4.0.7
Component Count: 9
Ref Value Part Footprint Description Vendor
C1 1uF device:C Capacitors_SMD:C_0805_HandSoldering Unpolarized capacitor
J1 Conn_01x09_Male conn:Conn_01x09_Male Connectors_JST:JST_EH_B09B-EH-A_09x2.50mm_Straight Generic connector, single row, 01x09
MK1 Mounting_Hole mechanical:Mounting_Hole Mounting_Holes:MountingHole_3.2mm_M3 Mounting Hole without connection
MK2 Mounting_Hole mechanical:Mounting_Hole Mounting_Holes:MountingHole_3.2mm_M3 Mounting Hole without connection
MK3 Mounting_Hole mechanical:Mounting_Hole Mounting_Holes:MountingHole_3.2mm_M3 Mounting Hole without connection
@coderjo
coderjo / game.dsc
Last active August 31, 2023 03:41
Run Myst 4 windowed
{graphic
full_screen ( false )
}
@coderjo
coderjo / LSK floppy autoloader.txt
Last active September 22, 2025 21:14
Information on LSK Data Systems 3.5" floppy autoloader
These are the result of observing the communication between the autoloader and software
that drove it, followed by poking with a terminal program.
RS232. 9600 8N1
on powerup:
prints "LSK Autoloader" and "Copyright - LSK Data Systems 1995"
S prints one char until C is run
COMMANDS: