mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
First draft at autogenerating the table in the README.
This commit is contained in:
93
README.md
93
README.md
@@ -89,62 +89,51 @@ Which?
|
||||
The current support state is as follows.
|
||||
|
||||
Dinosaurs (🦖) have yet to be observed in real life --- I've written the
|
||||
decoder based on Kryoflux (or other) dumps I've found. I don't (yet) have
|
||||
real, physical disks in my hand to test the capture process.
|
||||
encoder and/or decoder based on Kryoflux (or other) dumps I've found. I don't (yet) have
|
||||
real, physical disks in my hand to test the capture process, or hardware to verify that written disks work.
|
||||
|
||||
Unicorns (🦄) are completely real --- this means that I've read actual,
|
||||
physical disks with these formats and so know they work (or had reports from
|
||||
people who've had it work).
|
||||
physical disks with these formats and/or written real, physical disks and then
|
||||
used them on real hardware, and so know they work (or had reports from people
|
||||
who've had it work).
|
||||
|
||||
### Old disk formats
|
||||
|
||||
| Format | Read? | Write? | Notes |
|
||||
|:------------------------------------------|:-----:|:------:|-------|
|
||||
| [IBM PC compatible](doc/disk-ibm.md) | 🦄 | 🦄 | and compatibles (like the Atari ST) |
|
||||
| [Atari ST](doc/disk-atarist.md) | 🦄 | 🦄 | technically the same as IBM, almost |
|
||||
| [Acorn ADFS](doc/disk-acornadfs.md) | 🦄 | 🦖* | single- and double- sided |
|
||||
| [Acorn DFS](doc/disk-acorndfs.md) | 🦄 | 🦖* | |
|
||||
| [Ampro Little Board](doc/disk-ampro.md) | 🦖 | 🦖* | |
|
||||
| [Agat](doc/disk-agat.md) | 🦖 | | Soviet Union Apple-II-like computer |
|
||||
| [Apple II](doc/disk-apple2.md) | 🦄 | 🦄 | both 140kB and 640kB formats |
|
||||
| [Amiga](doc/disk-amiga.md) | 🦄 | 🦄 | |
|
||||
| [Commodore 64 1541/1581](doc/disk-c64.md) | 🦄 | 🦄 | and probably the other formats |
|
||||
| [Brother 120kB](doc/disk-brother.md) | 🦄 | 🦄 | |
|
||||
| [Brother 240kB](doc/disk-brother.md) | 🦄 | 🦄 | |
|
||||
| [Brother FB-100](doc/disk-fb100.md) | 🦖 | | Tandy Model 100, Husky Hunter, knitting machines |
|
||||
| [Elektronika BK](doc/disk-bd.md) | 🦄 | 🦄 | Soviet Union PDP-11 clone |
|
||||
| [Macintosh 400kB/800kB](doc/disk-macintosh.md) | 🦄 | 🦄 | |
|
||||
| [NEC PC-98](doc/disk-ibm.md) | 🦄 | 🦄 | trimode drive not required |
|
||||
| [pSOS](doc/disk-ibm.md) | 🦄 | 🦖* | pSOS PHILE file system |
|
||||
| [Sharp X68000](doc/disk-ibm.md) | 🦄 | 🦄 | yet another IBM scheme |
|
||||
| [Smaky 6](doc/disk-smaky6.md) | 🦖 | | 5.25" hard sectored |
|
||||
| [TRS-80](doc/disk-trs80.md) | 🦖 | 🦖* | a minor variation of the IBM scheme |
|
||||
{: .datatable }
|
||||
|
||||
`*`: these formats are variations of the generic IBM format, and since the
|
||||
IBM writer is completely generic, it should be configurable for these
|
||||
formats... theoretically. I don't have the hardware to try it.
|
||||
|
||||
### Even older disk formats
|
||||
|
||||
These formats are for particularly old, weird architectures, even by the
|
||||
standards of floppy disks. They've largely been implemented from single flux
|
||||
files with no access to physical hardware. Typically the reads were pretty
|
||||
bad and I've had to make a number of guesses as to how things work. They do,
|
||||
at least, check the CRC so what data's there is probably good.
|
||||
|
||||
| Format | Read? | Write? | Notes |
|
||||
|:-----------------------------------------|:-----:|:------:|-------|
|
||||
| [AES Superplus / No Problem](doc/disk-aeslanier.md) | 🦖 | | hard sectors! |
|
||||
| [Durango F85](doc/disk-durangof85.md) | 🦖 | | 5.25" |
|
||||
| [DVK MX](doc/disk-mx.md) | 🦖 | | Soviet PDP-11 clone |
|
||||
| [VDS Eco1](doc/disk-eco1.md) | 🦖 | | 8" mixed format |
|
||||
| [Micropolis](doc/disk-micropolis.md) | 🦄 | | Micropolis 100tpi drives |
|
||||
| [Northstar](doc/disk-northstar.md) | 🦖 | 🦖 | 5.25" hard sectors |
|
||||
| [TI DS990 FD1000](doc/disk-tids990.md) | 🦄 | 🦄 | 8" |
|
||||
| [Victor 9000](doc/disk-victor9k.md) | 🦖 | | 5.25" GCR encoded |
|
||||
| [Zilog MCZ](doc/disk-zilogmcz.md) | 🦖 | | 8" _and_ hard sectors |
|
||||
<!-- FORMATSSTART -->
|
||||
<!-- This section is automatically generated. Do not edit. -->
|
||||
| Profile | Format | Read? | Write? | Filesystem? |
|
||||
|:--------|:------:|:-----:|:------:|-------------|
|
||||
| acornadfs | Acorn ADFS family (ro) | YES | | |
|
||||
| acorndfs | Acorn DFS fmaily | YES | YES | ACORNDFS |
|
||||
| aeslanier | AES Lanier "No Problem" 616kB 5.25" 77-track SSDD hard sectored (ro) | YES | | |
|
||||
| agat | Agat 840kB 5.25" 80-track DS (ro) | YES | YES | |
|
||||
| amiga | Amiga 880kB 3.5" DSDD | YES | YES | AMIGAFFS |
|
||||
| ampro | Ampro 5.25" family | YES | | CPMFS |
|
||||
| apple2 | Apple II family | YES | YES | APPLEDOS CPMFS PRODOS |
|
||||
| atarist | Atari ST family | YES | YES | |
|
||||
| bk | BK 800kB 5.25"/3.5" 80-track 10-sector DSDD | YES | YES | |
|
||||
| brother | Brother GCR family | YES | YES | BROTHER120 FATFS |
|
||||
| commodore | Commodore 1541 171kB/192kB 5.25" 35/40-track SS GCR | | | CBMFS |
|
||||
| eco1 | VDS Eco1 1210kB 77-track mixed format DSHD (ro) | YES | | CPMFS |
|
||||
| epsonpf10 | Epson PF-10 40-track DS DD (ro) | YES | | CPMFS |
|
||||
| f85 | Durango F85 461kB 5.25" 77-track SS (ro) | YES | | |
|
||||
| fb100 | Brother FB-100 100kB 3.5" 40-track SS (ro) | YES | | |
|
||||
| hplif | Hewlett-Packard LIF family | YES | | LIF |
|
||||
| ibm | Generic PC 3.5"/5.25" family | YES | | FATFS |
|
||||
| icl30 | ICL Model 30 263kB 35-track DSSD | YES | | CPMFS |
|
||||
| mac | Macintosh GCR family | YES | YES | MACHFS |
|
||||
| micropolis | Micropolis format family | YES | YES | |
|
||||
| mx | DVK MX family | YES | | |
|
||||
| n88basic | N88-BASIC 5.25"/3.5" 77-track 26-sector DSHD | YES | YES | |
|
||||
| northstar | Northstar family | YES | YES | |
|
||||
| psos | pSOS generic 800kB DSDD with PHILE | YES | YES | PHILE |
|
||||
| rolandd20 | Roland D20 | YES | | |
|
||||
| rx50 | Digital RX50 400kB 5.25" 80-track 10-sector SSDD | YES | YES | |
|
||||
| smaky6 | Smaky 6 308kB 5.25" 77-track 16-sector SSDD, hard sectored | YES | | SMAKY6 |
|
||||
| tids990 | Texas Instruments DS990 1126kB 8" DSSD | YES | YES | |
|
||||
| tiki | Tiki 100 family | YES | | CPMFS |
|
||||
| victor9k | Victor 9000 / Sirius One family | YES | YES | |
|
||||
| zilogmcz | Zilog MCZ 320kB 8" 77-track SS hard-sectored (ro) | YES | | |
|
||||
{: .datatable }
|
||||
<!-- FORMATSEND -->
|
||||
|
||||
### Notes
|
||||
|
||||
|
||||
55
scripts/mkdocindex.cc
Normal file
55
scripts/mkdocindex.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
#include "lib/globals.h"
|
||||
#include "lib/proto.h"
|
||||
#include "lib/flags.h"
|
||||
#include <fmt/format.h>
|
||||
|
||||
extern const std::map<std::string, const ConfigProto*> formats;
|
||||
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
fmt::print("<!-- FORMATSSTART -->\n");
|
||||
fmt::print("<!-- This section is automatically generated. Do not edit. -->\n");
|
||||
fmt::print("| Profile | Format | Read? | Write? | Filesystem? |\n");
|
||||
fmt::print("|:--------|:------:|:-----:|:------:|-------------|\n");
|
||||
|
||||
for (auto [name, config] : formats)
|
||||
{
|
||||
if (config->is_extension())
|
||||
continue;
|
||||
|
||||
std::set<std::string> filesystems;
|
||||
auto addFilesystem = [&](const FilesystemProto& fs) {
|
||||
if (fs.type() != FilesystemProto::NOT_SET)
|
||||
{
|
||||
const auto *descriptor = FilesystemProto::FilesystemType_descriptor();
|
||||
auto name = descriptor->FindValueByNumber(fs.type())->name();
|
||||
|
||||
filesystems.insert(name);
|
||||
}
|
||||
};
|
||||
|
||||
addFilesystem(config->filesystem());
|
||||
for (const auto& group : config->option_group())
|
||||
{
|
||||
for (const auto& option : group.option())
|
||||
addFilesystem(option.config().filesystem());
|
||||
}
|
||||
for (const auto& option : config->option())
|
||||
addFilesystem(option.config().filesystem());
|
||||
|
||||
std::stringstream ss;
|
||||
for (auto& fs : filesystems)
|
||||
ss << fs << " ";
|
||||
|
||||
fmt::print("| {} | {} | {} | {} | {} |\n",
|
||||
name, config->comment(),
|
||||
config->has_decoder() ? "YES" : "",
|
||||
config->has_encoder() ? "YES" : "",
|
||||
ss.str());
|
||||
}
|
||||
|
||||
std::cout << "{: .datatable }\n";
|
||||
fmt::print("<!-- FORMATSEND -->\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -78,4 +78,25 @@ doc/disk-%.md: src/formats/%.textpb $(OBJDIR)/mkdoc.exe
|
||||
@$(OBJDIR)/mkdoc.exe $* > $@
|
||||
|
||||
|
||||
$(OBJDIR)/mkdocindex.exe: $(OBJDIR)/scripts/mkdocindex.o
|
||||
|
||||
$(OBJDIR)/scripts/mkdocindex.o: scripts/mkdocindex.cc
|
||||
|
||||
$(call use-library, $(OBJDIR)/mkdocindex.exe, $(OBJDIR)/scripts/mkdocindex.o, PROTO)
|
||||
$(call use-library, $(OBJDIR)/mkdocindex.exe, $(OBJDIR)/scripts/mkdocindex.o, LIBFORMATS)
|
||||
$(call use-library, $(OBJDIR)/mkdocindex.exe, $(OBJDIR)/scripts/mkdocindex.o, LIBFLUXENGINE)
|
||||
|
||||
|
||||
docs: $(patsubst %, doc/disk-%.md, $(FORMATS))
|
||||
|
||||
doc/disk-%.md: src/formats/%.textpb $(OBJDIR)/mkdoc.exe
|
||||
@echo MKDOC $@
|
||||
@mkdir -p $(dir $@)
|
||||
@$(OBJDIR)/mkdoc.exe $* > $@
|
||||
|
||||
docs: README.md
|
||||
README.md: $(OBJDIR)/mkdocindex.exe
|
||||
@echo MKDOCINDEX $@
|
||||
@csplit -q -f$(OBJDIR)/README. --suppress-matched README.md '/<!-- FORMATSSTART -->/' '%<!-- FORMATSEND -->%'
|
||||
@(cat $(OBJDIR)/README.00 && $(OBJDIR)/mkdocindex.exe && cat $(OBJDIR)/README.01) > README.md
|
||||
|
||||
|
||||
Reference in New Issue
Block a user