Commit Graph

151 Commits

Author SHA1 Message Date
David Given
e1f2494966 Create a config module containing all the configuration, proto and flags
stuff.
2024-10-13 11:57:18 +02:00
David Given
9ddfa5a56b Move the logger into core. 2024-10-13 11:39:33 +02:00
David Given
7e80e255a4 Config no longer depends on Flux/Image/Encode/Decode, breaking a circular
dependency.
2024-10-12 01:49:13 +02:00
David Given
75f41fc630 imagereader proto built separately. 2024-10-09 01:28:07 +02:00
David Given
27ab1e3e5a Refactor a lot of the proto stuff. 2024-10-08 23:18:30 +02:00
David Given
ca940d1599 Refactor core libraries into their own library. 2024-10-01 20:36:53 +02:00
David Given
7095c03e28 Fix a whole pile of missing 'override' keywords. 2024-01-22 20:55:38 +01:00
David Given
533b217c8f Eliminate the broken tpi system for a simple drive/format type field. 2023-10-29 21:10:14 +01:00
David Given
f5f223f622 First steps towards reworking the build system... again. 2023-10-21 23:02:46 +02:00
David Given
b9ef5b7db8 Rename all the flux and image types to prefix the enums, due to them being in
the global namespace now.
2023-07-24 02:18:53 +02:00
dg
dcfcc6271c Sort out a whole bunch of other things, including cleaning up the way the
verification source is handled.
2023-05-12 23:28:25 +00:00
dg
1d77ba6429 ImageReaders can now contribute config. 2023-05-12 22:20:13 +00:00
dg
08e9e508cc Move setting the image reader into Config. 2023-05-11 23:02:05 +00:00
dg
42e6c11081 Migrate to a new global config object. 2023-05-10 23:13:33 +00:00
dg
9ba3f90f1e Change the global config variable to a globalConfig() function. 2023-05-10 22:07:17 +00:00
dg
6b990a9f51 Overhaul the TPI stuff; now both the drive and the layout have a TPI setting,
which must be set.
2023-05-10 19:58:44 +00:00
dg
d4b55cd8f5 Switch from Logger() to log(). 2023-05-09 22:47:36 +00:00
dg
baaeb0bca7 Fix mangled formatting caused by clang-format. 2023-05-09 21:39:35 +00:00
dg
466c3c34e5 Replace the Error() object with an error() function which takes fmt
formatspecs, making for much cleaner code. Reformatted everything.

This actually happened in multiple steps but then I corrupted my local
repository and I had to recover from the working tree.
2023-05-09 20:59:44 +00:00
dg
a91dee27e7 Rework the layout stuff to be more correct. Physical skew no longer affects the
order in the resulting images.
2022-12-04 19:19:37 +00:00
David Given
48540245b5 Convert the imagereader/writer to use proto enums rather than oneofs. 2022-11-20 10:25:19 +01:00
Thomas Daede
f8257e697a D88: Use the data length field to seek past any extra data.
This will effectively ignore the field length if it is shorter
than the sector size (or 0).
2022-10-02 16:45:51 -07:00
David Given
0ddfd3bead Merge pull request #605 from tdaede/fix_physical_sector_ordering
D88/NFD: Add physical layout before adding sector.
2022-10-02 20:46:38 +02:00
Thomas Daede
ef5f7ec9c3 D88/NFD: Add physical layout before adding sector.
Partially fixes #603, it is still busted if the number of
tracks is specified larger than what is in the image, which
used to work.
2022-10-01 19:43:17 -07:00
Thomas Daede
69c60c4026 Force density setting for D88/NFD.
This fixes #560 (partially).

I do not understand how the protobuf parsing stuff works enough
to make it detect optional fields.
2022-10-01 18:48:12 -07:00
David Given
88fc7ff9c3 Begin cleaning up the Layout stuff. 2022-09-15 21:45:12 +02:00
David Given
8eb17bf104 Merge pull request #591 from davidgiven/c64
Rework the entire layout stuff.
2022-09-15 21:07:16 +02:00
David Given
9a8fc80220 Massive overhaul of how the physical/logical layout mapping is done, to make it
more consistent and bidirectional everywhere and just generally better.
Hopefully this fixes that pesky 1581 problem.
2022-09-15 20:23:33 +02:00
David Given
0665fc0a6f Add an option for, er, options defined in config files. 2022-09-14 00:04:29 +02:00
David Given
538a22e2f7 Another attempt at making filesystem sector ordering work again. 2022-09-11 19:53:18 +02:00
David Given
3cb098f9ba Rip out the old approach to soft sector remapping as it wasn't working. 2022-09-11 17:05:40 +02:00
David Given
dda713a6be Remove the rest of the mapper. 2022-09-10 22:47:35 +02:00
David Given
415aa82a6f The top-level tracks and heads fields are now inferred automatically from the
layout if not set, so we don't have to set them everywhere.
2022-09-10 22:29:27 +02:00
David Given
085ad5f2a4 Actually start using the new physical sector stuff. 2022-09-10 20:43:24 +02:00
David Given
a6db36e7b3 Convert from LayoutData to Layout. 2022-09-10 19:53:05 +02:00
David Given
1a4caccd07 Rename Sector.logicalSector to Sector.physicalSector. 2022-09-10 18:59:06 +02:00
David Given
3256b4f627 Eliminate the IBM trackdata sector layout stuff in favour of the layout{}
clause.
2022-08-27 23:23:28 +02:00
David Given
1dd94a7d82 Refactor disk layout information out of ImgReaderWriterProto into a new
top-level config paragraph.
2022-08-25 22:51:26 +02:00
Thomas Daede
498558c2b1 Add n88basic sector gaps to d88 reader for PC-88 DD disks.
The values used for 1.2MB HD disks are too narrow for the
PC-88's disk controller.
2022-08-09 21:47:34 -07:00
wybren1971
30681dfa2c Corrected spelling error 2022-07-02 16:04:54 +02:00
wybren1971
4470fb4312 add breaks to the switch statements 2022-06-26 18:26:03 +02:00
wybren1971
4d7ddf3d9e add writing IMD images functionality 2022-06-19 16:49:31 +02:00
wybren1971
c4603e1230 Clean up code IMD imagereader 2022-06-10 09:02:20 +02:00
wybren1971
c6fd31564d update in skewsettings 2022-06-09 23:26:28 +02:00
wybren1971
c4d72d3c11 Write IMD file to floppy 2022-06-09 07:57:11 +02:00
David Given
adff739a5d Partial conversion to do automatic scaling of flux based on the disk rotation
speed. Although, something seems to have broken for 5.25" disks.
2022-03-27 23:50:32 +02:00
David Given
29f181f9bf Change the readers to correctly set the physical track for each sector using
the mapper (where appropriate).
2022-03-25 20:50:57 +01:00
David Given
86c5cccb08 Rename cylinder to track throughout (mostly). 2022-03-25 20:16:12 +01:00
David Given
d303067deb Massive refactor to work in logical cylinders everywhere. The logical/physical
mapping is now done at the last stage and should, ideally, be automatic. I'm
sure there are bugs everywhere.
2022-03-25 00:22:28 +01:00
David Given
ba3f806616 Move a lot of drive parameters into a toplevel drive{} config rather than
leaving them in the source/sink configs (which means they have to be set
twice).
2022-03-13 21:13:56 +01:00