Thomas Harte
5e34c1b6b8
Switches to producing a single segment for NIBs and DSKs.
...
I've now seemingly verified that the values read back by the CPU are those I'm intending to produce, so I'm at a loss.
2018-05-01 20:31:42 -04:00
Thomas Harte
f4097290c2
Made various corrections following a quick for-loop constness audit.
2018-04-30 22:23:57 -04:00
Thomas Harte
9da481b060
Slightly simplifies syntax.
2018-04-30 22:08:51 -04:00
Thomas Harte
79002d6962
Adds an additional assert.
2018-04-30 22:07:54 -04:00
Thomas Harte
10c0e687f5
Attempts to introduce sleeping for the Disk II.
2018-04-29 17:51:10 -04:00
Thomas Harte
a9d4fe0b41
Introduces filetype wiring for DO and PO files.
...
Also corrects sector numbering logic to ensure there is a sector 15.
2018-04-29 16:34:10 -04:00
Thomas Harte
5cd15147eb
Introduces interleaving of sector numbers.
2018-04-29 16:18:14 -04:00
Thomas Harte
c62db6665a
Corrects storage of lower two bit pairs.
...
It turns out the non-integral result of 256/3 is handled differently than my guess.
2018-04-29 11:20:23 -04:00
Thomas Harte
fabcb261dc
Corrects data prologue usage and off-by-one error in checksum placement.
2018-04-28 23:17:06 -04:00
Thomas Harte
45cf28e0eb
Corrects sync lengths.
2018-04-28 15:48:49 -04:00
Thomas Harte
5b35c88be2
Corrections: data segments now correctly announce their number of bits, and tracks aren't oversized.
2018-04-28 15:47:50 -04:00
Thomas Harte
7f03f5d02f
Makes a first attempt at six-and-two encoding for DSKs.
2018-04-28 15:18:48 -04:00
Thomas Harte
b98d5b790a
Finally unifies disk image file exceptions, and adds a placeholder for Apple DSK.
2018-04-27 23:18:45 -04:00
Thomas Harte
5c74044e62
Unifies constants.
2018-04-27 21:38:08 -04:00
Thomas Harte
992a99d792
Improves validation of suspected sync regions.
2018-04-27 19:53:35 -04:00
Thomas Harte
41075356e2
Makes a first attempt at NIB support.
2018-04-26 22:49:07 -04:00
Thomas Harte
d59db504a3
Adjusted stepper logic; some disks load now.
2018-04-25 21:59:18 -04:00
Thomas Harte
4c6dc597f4
Converts Time::get into a template, introduces a via-a-double fallback for the timed event loop.
2018-04-25 19:54:39 -04:00
Thomas Harte
376b26c1e4
Simplifies the rotational multiplier upon construction, to mitigate against scale issues later.
2018-04-24 20:16:14 -07:00
Thomas Harte
7061537ff5
Makes joined-up attempt to run data through the Disk II.
2018-04-24 19:44:45 -07:00
Thomas Harte
4cbe5068a9
Works further towards NIB, but still isn't close.
2018-04-23 20:01:12 -07:00
Thomas Harte
38b2302b59
Corrects minor documentation errors.
2018-04-23 19:59:19 -07:00
Thomas Harte
bce0702745
Makes some faulty steps further towards providing Apple GCR assistance.
2018-04-23 19:59:03 -07:00
Thomas Harte
d447e81abd
Adds provisional support for WOZ files.
2018-04-23 19:57:45 -07:00
Thomas Harte
6592745e53
Adds the bare minimum to respond to attempts to open NIB files with an Apple II.
2018-04-21 21:21:57 -07:00
Thomas Harte
72bc5f8d7b
Adds a class to contain the Disk II and begins Apple GCR conversion routines.
2018-04-21 14:33:42 -07:00
Thomas Harte
e1c4035812
Switches away from C strings and allows Vic-20 region inference from filenames.
2018-04-06 17:42:24 -04:00
Thomas Harte
3bb496f9ae
Enforces a maximum sector size to avoid impossible sizes.
...
Such as 128 * 2^255.
2018-03-22 22:00:26 -04:00
Thomas Harte
aafdff49be
Implements the ugly stuff of converting a DMK back to flux.
2018-01-09 22:13:04 -05:00
Thomas Harte
4ef583813a
Minor tidying of PCMSegment and Oric MFM DSK.
2018-01-09 22:12:34 -05:00
Thomas Harte
9f97fb738e
Merge branch 'master' into DMK
2018-01-09 19:42:27 -05:00
Thomas Harte
4e124047c6
Introduces enough DMK support to progress to failure to parse a track.
2018-01-08 21:57:11 -05:00
Thomas Harte
6eb56a1564
Corrects various comment typos.
2018-01-08 20:55:40 -05:00
Thomas Harte
35fc0a5c16
Corrects assumption of double sidedness.
2018-01-08 09:35:29 -05:00
Thomas Harte
0ccc104027
Corrects start sector and track interleaving for MSX DSK.
...
MSX DSKs start with sector 1; Acorn disks still begin with sector 0. Also it turns out that MSX DSKs are indeed interleaved.
2018-01-07 21:59:18 -05:00
Thomas Harte
2f59226300
Fixes: DiskROM drive motor control, track_for_sectors' sides.
2018-01-07 20:02:40 -05:00
Thomas Harte
999a0c22d4
Adds superficial support for MSX .DSK.
...
In the sense that the file format itself is properly parsed, but the MSX doesn't actually yet have disk hardware.
2018-01-07 16:35:57 -05:00
Thomas Harte
0eaac99d74
Avoids implicit signed/unsigned comparison in the G64 reader.
2017-11-12 17:48:11 -05:00
Thomas Harte
792061a82b
Corrects warnings in the CSW, CPC DSK, ZX8081 data encoding, and PRG and binary cartridges.
2017-11-12 17:46:06 -05:00
Thomas Harte
5aef81cf24
Commutes cross-platform #pragma mark
s to //MARK:
s.
2017-11-12 15:59:11 -05:00
Thomas Harte
bce58683fa
Corrects insert
explicitly to supply a shared_ptr
rather than a raw one.
2017-11-11 18:22:41 -05:00
Thomas Harte
2e15fab651
Doubles down on <cX> over <X.h> for C includes, and usage of the namespace for those types and functions.
2017-11-11 15:28:40 -05:00
Thomas Harte
cb0f58ab7a
Corrects order-of-initialisation errors in the CPC (again), TextureBuilder, TextureTarget, Z80, MFM parser and binary tape player.
2017-11-10 22:57:03 -05:00
Thomas Harte
d9e56711ce
Corrects order-of-initialisation errors in the Amstrad CPC, Vic-20, Oric, Commodore File, MFM disk controller, UEF and Commodore tape parser.
2017-11-10 22:47:10 -05:00
Thomas Harte
fabaf4e607
Adds missing include files, corrects bad include paths and eliminates the Clang-specific __undefined
.
2017-11-10 21:56:53 -05:00
Thomas Harte
c0055a5a5f
Further builds up SConstruct, correcting many missed imports and a couple of improper uses of C99 in C++ code.
2017-11-09 22:04:49 -05:00
Thomas Harte
f95515ae81
Eliminates a large number of instance of end-of-line tabs.
2017-11-07 22:51:06 -05:00
Thomas Harte
23d5849cda
Attempts to map recognised [M]FM errors back to FDC status codes.
2017-11-03 21:29:42 -04:00
Thomas Harte
5a3ca0e447
Adds output for modified CPC DSKs.
2017-11-03 21:10:22 -04:00
Thomas Harte
e384c50580
Switches FileHolder to have a usage much closer to FILE *.
...
Thereby opens a route for file format implementations such as that appearing for CPC DSK that create an in-memory copy and perform a full rewrite.
2017-11-02 22:32:00 -04:00
Thomas Harte
f807a6b608
Generalises the concept of multiple samplings of an FM/MFM sector, simplifying CPC DSK support and paving the way for generic weak/fuzzy bit support.
2017-10-31 21:32:28 -04:00
Thomas Harte
833f8c02a4
Switches the CPC DSK implementation to building an in-memory version of the structure up front.
...
Preparatory to making these things writeable.
2017-10-31 19:41:16 -04:00
Thomas Harte
ad9df4bb90
Commutes uint8_t *
, uint16_t *
, uint32_t *
, size_t
, off_t
and long
to functional-style casts.
2017-10-21 22:30:15 -04:00
Thomas Harte
e983854e71
Converts all uint8_t
and uint16_t
casts to the functional style.
2017-10-21 21:50:53 -04:00
Thomas Harte
ec999446e8
Commutes int
and unsigned
casts to the functional style.
2017-10-21 21:00:40 -04:00
Thomas Harte
5e3e91373a
Switches all unsigned int
and double
casts to functional style.
2017-10-21 19:49:04 -04:00
Thomas Harte
7f2febeec9
Ensures complete DPLL initial state assignment.
2017-10-17 22:13:37 -04:00
Thomas Harte
2d7a4fe5f0
Switches the MFM shifter to unsigned accumulation.
...
Since left shifting signed numbers is undefined behaviour.
2017-10-17 22:12:04 -04:00
Thomas Harte
b4583e976e
Corrects buffer overwrites resulting from failure to treat a number of records of 0x80 as a special case.
2017-10-17 20:52:16 -04:00
Thomas Harte
44cdc124af
Switches to providing a full record of changes to disk images, rather than feeding them a track at a time.
...
Gets explicit about `override`s while doing so, to ensure full adaptation.
2017-10-07 19:37:36 -04:00
Thomas Harte
b37787a414
Ensures lifetime-linked track flushing without relying on virtual calls within a destructor.
2017-10-07 19:14:18 -04:00
Thomas Harte
53b99ea248
Uses Disk::flush_tracks to elide replacement of dirty tracks.
2017-10-06 22:07:42 -04:00
Thomas Harte
97a2be71e3
Introduces flush_tracks to Drive, while switching its interface to using Track::Address and adjusting associated integer types.
2017-10-06 21:45:12 -04:00
Thomas Harte
edb9fd301c
Begins this project's conversion to functional-style casts.
2017-10-03 22:04:15 -04:00
Thomas Harte
0fb363ea0e
Adds writing support for HFEs.
2017-10-03 21:24:20 -04:00
Thomas Harte
1cc85615d5
Factors HFE track seeking out from the track fetching method.
2017-10-03 20:33:55 -04:00
Thomas Harte
7b01c1bee6
Revokes direct visibility of is_read_only_ to subclasses of FileHolder.
2017-10-03 19:36:06 -04:00
Thomas Harte
35705c5345
Factors out bit reversing from the HFE class.
2017-10-03 19:12:45 -04:00
Thomas Harte
ef605eda51
Factors out commonalities in SSD/DSD and ADF implementations.
2017-09-30 20:30:15 -04:00
Thomas Harte
326857a84d
Corrects FM/MFM selection when looking for sectors.
2017-09-29 22:48:00 -04:00
Thomas Harte
5dd3945695
Factors out the more egregious similarities between ADF and SSD.
2017-09-29 22:07:23 -04:00
Thomas Harte
19eb975c73
Adds an intermediate step in CP/M directory parsing.
...
To reduce amount of time spent allocating and reallocating buffers.
2017-09-29 21:38:16 -04:00
Thomas Harte
698ffca51b
Recasts the [M]FM parser in terms of the new factoring.
...
Temporarily breaks SSD writing support.
2017-09-29 20:08:36 -04:00
Thomas Harte
fe3cc5c57c
Removes dead pragma.
2017-09-28 20:47:25 -04:00
Thomas Harte
f488854720
Switches Oric MFM DSK serialisation to feeding a track serialisation to a shifter.
...
Thereby eliminates the parser's need to offer get_track.
2017-09-27 22:14:50 -04:00
Thomas Harte
51c0c45e04
Turns MFM bit length into a globally-available constant.
2017-09-27 21:30:09 -04:00
Thomas Harte
c3e1489a8e
Introduces Track::Address, a parallel to Sector::Address to enable more uniform storage.
2017-09-27 21:29:06 -04:00
Thomas Harte
e3420f62c6
Switches the Acorn ADF implementation to using the new track_serialisation/sectors_from_segment route for decomposition of a track into sectors.
2017-09-26 22:05:33 -04:00
Thomas Harte
9f4a407f94
Switches the track serialiser to a more standard header + implementation separation.
...
Also introduces a full priming of the PLL before deserialisation begins.
2017-09-26 22:01:32 -04:00
Thomas Harte
5dda897334
Changes function name to sector_size
— into line with idioms.
2017-09-26 22:00:19 -04:00
Thomas Harte
3982e375e3
Introduces a route from a PCMSegment
to a list of [M]FM sectors.
2017-09-25 19:57:11 -04:00
Thomas Harte
a8524daecb
Marks the move constructor as noexcept, to improve usage with vector
.
2017-09-25 19:53:22 -04:00
Thomas Harte
d1ce764201
Provides SectorsFromSegment, a bitstream to sector converter.
2017-09-24 22:41:16 -04:00
Thomas Harte
8875982e1f
Ensures Sectors are move constructible (and still default constructible), and adds proper const qualifiers to Sector::Address.
2017-09-24 22:40:38 -04:00
Thomas Harte
3319a4f589
Isolates those Sector
fields that describe its address and makes them usable as a set key.
2017-09-24 21:57:21 -04:00
Thomas Harte
c7f27b2db4
Renames MFM.[c/h]pp as per its new remit: encoding only.
2017-09-24 21:40:43 -04:00
Thomas Harte
631f630549
Severs the MFM parser from the overweight single MFM.hpp.
2017-09-24 20:31:19 -04:00
Thomas Harte
2a08bd9ecc
Factors shifting plus stateful [M]FM token recognition out of the MFMDiskController.
...
Given the proliferation of MFM-related classes, establishes a subdirectory for them.
2017-09-24 20:07:56 -04:00
Thomas Harte
f789ee4ff0
Introduces a track to segment decoder.
...
This will be needed to make formats like G64 and HFE writeable, but probably also will be usable to speed up static analysis.
2017-09-23 22:39:19 -04:00
Thomas Harte
d72dad2d1a
Severs the DiskImage implementation from its public header file.
2017-09-22 22:46:31 -04:00
Thomas Harte
698e4fe550
Tidies the Disk
file hierarchy.
2017-09-22 22:39:23 -04:00
Thomas Harte
b5406b90cd
Introduces a new class hierarchy for disk images.
...
Increasing independence of format-specific stuff and generic caching without mangling them into a common namespace, and allowing in some cases for a decrease in read/write blocking.
2017-09-22 20:28:11 -04:00
Thomas Harte
44a56724cb
Speeds up byte decoding within sectors for the ahead-of-time MFM parser.
2017-09-16 20:28:24 -04:00
Thomas Harte
a85909198f
Adds defences against double calls to end writing.
2017-09-16 17:07:36 -04:00
Thomas Harte
da082673d7
Drives now have a finite number of heads.
...
The Amstrad volunteers itself to be single sided. Everything else stays as it was.
2017-09-15 21:18:36 -04:00
Thomas Harte
662d031e3c
Adds exposition on the meaning of a disk controller being in write mode.
2017-09-15 19:14:36 -04:00
Thomas Harte
bf20c717fb
The Drive now no longer produces input when in writing mode — other than announcing the index hole.
2017-09-14 22:32:13 -04:00
Thomas Harte
4d4a0cf1d2
Puts the disk controller back into the loop with knowledge about reading mode, and uses that knowledge to cut off the PLL.
2017-09-14 22:30:40 -04:00
Thomas Harte
82b13e98f2
Implements the real hardware ready test for Drives — motor on plus two index holes.
2017-09-11 22:27:50 -04:00
Thomas Harte
96bf133924
Withdraws requirement for DiskController users to specify a PLL multiplier or to provide rotation speed.
...
In the latter case because it's no longer of any interest to the controller, and in the former because I'd rather it be picked automatically.
2017-09-10 22:56:05 -04:00