Commit Graph

13 Commits

Author SHA1 Message Date
kris c57ee58def Add some more file types
Fix some anomaly types
Add anomalies for corrupted catalog metadata (pointing to out-of-bounds sector)

Don't render the entire disk catalog in __str__, it's too verbose.  Move it to a dedicated Catalog() method
2017-04-24 22:38:38 +01:00
kris 67683829e4 When successfully tasting a disk add the new disk as a child of the parent 2017-04-24 22:35:32 +01:00
kris da5afa2a36 Oops T$00 S$00 is boot1, not RWTS 2017-04-24 21:54:33 +01:00
kris 6ca343400e Add some VTOC anomalies 2017-04-20 23:21:01 +01:00
kris f3bde766bf Add a container.Container() type that carries a list of Anomaly()
objects associated to the container, and builds a tree of child
containers with support for depth-first recursion

Convert all of the disk container classes to use Container() and
register themselves with this tree.  This constructs a hierarchy of
container objects rooted in Disk that describe the structures found on
the disk image.

Convert most of the print statements and some of the assertions to
register Anomaly records instead

Fix/improve some of the __str__ representations
2017-04-20 23:04:24 +01:00
kris 8148053965 Add an anomaly message type for collecting interesting or unusual artefacts about a disk structure. 2017-04-20 22:59:02 +01:00
kris b4ea155b24 Add a utils.HexDump library
Be a bit more robust about dealing with data corruption
2017-04-16 22:56:04 +01:00
kris b97c404514 - Rename File class to FileType and add support for a filetype parser
- Add support for parsing Applesoft basic files
- Add a new File class that receives the contents of a DOS 3.3 file
  (also parsed, if applicable)
- Some minor bugfixes
2017-04-16 22:23:04 +01:00
kris f6581c9078 Fix a bug: data track/sector entries should only be skipped if track == 0, not sector == 0. 2017-04-16 00:31:07 +01:00
kris df17eac3df Process the VTOC freemap and mark sectors that are claimed to be free
Handle the case of Catalog entries that point to track $0x00, this means "has never been allocated".  Nothing can ever point to T0
2017-04-16 00:24:08 +01:00
kris 6ae678890c disk.py
- Support specializations of Sector, and promoting from Sector to a subclass by the Sector.fromSector() classmethod
- have the Sector() __init__ method register itself with the disk via disk.SetSectorOwner()
- Add a disk.RWTS sector type
- Add a disk.Taste classmethod that attempts to interpret a disk as a subclass, which may be rejected

dos33disk.py
- Read the VTOC, Catalog, File metadata and file content sectors and claim them in the disk

process.py
- moved the main() method here to iterate over disk images under a directory and attempt to taste them as DOS 3.3 disks
2017-04-16 00:00:46 +01:00
kris c66456a9e5 Initial support for reading .dsk images.
For each sector we compute a sha1 hash, and use this to recognie some common sector types (zero, common RWTS sectors)

Also compute the zlib compressibility of the sector as a way of estimating entropy, which might be useful in providing insight into whether it contains e.g. code or data.
2017-04-15 22:32:26 +01:00
KrisKennaway df99058710 Initial commit 2017-04-15 21:33:30 +01:00