Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "extern/ptable"]
path = extern/ptable
url = https://github.com/pulchart/amigaos-ptable
101 changes: 80 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

# Release version: YYYYMMDD package date + optional in-progress suffix
# (-dev, -rc1, ...). Empty suffix for a final release.
RELEASE_DATE = 20260614
VERSION_SUFFIX =
RELEASE_DATE = 20260730
VERSION_SUFFIX = -dev

# fat95 filesystem handler version
FAT95_MAJOR = 3
FAT95_MINOR = 24
FAT95_VERSION_SUFFIX =
FAT95_DATE = 07.06.2026
FAT95_MAJOR = 4
FAT95_MINOR = 0
FAT95_VERSION_SUFFIX = -dev
FAT95_DATE = 30.07.2026

# Tools versions
INSTALL95_MAJOR = 3
Expand Down Expand Up @@ -58,8 +58,14 @@ SETFILESIZE_VERSION = $(SETFILESIZE_MAJOR).$(SETFILESIZE_MINOR)$(SETFILESIZE_VER
BOOT95_VERSION = $(BOOT95_MAJOR).$(BOOT95_MINOR)$(BOOT95_VERSION_SUFFIX)
LSFSRES_VERSION = $(LSFSRES_MAJOR).$(LSFSRES_MINOR)$(LSFSRES_VERSION_SUFFIX)

# ptable.library + lsptres versions/dates read from the ptable build stamps.
PLIB_VERSION = $(firstword $(shell cat $(PTABLE_VERSION_FILE) 2>/dev/null))
PLIB_DATE = $(word 2,$(shell cat $(PTABLE_VERSION_FILE) 2>/dev/null))
LSPTRES_VERSION = $(firstword $(shell cat $(PTABLE_LSPTRES_VERSION_FILE) 2>/dev/null))
LSPTRES_DATE = $(word 2,$(shell cat $(PTABLE_LSPTRES_VERSION_FILE) 2>/dev/null))

# Component table driving TOOLS and the README/dist auto-gen blocks.
COMPONENTS = FAT95 INSTALL95 DD DEBUG95 SETFILESIZE BOOT95 LSFSRES
COMPONENTS = FAT95 INSTALL95 DD DEBUG95 SETFILESIZE BOOT95 LSFSRES PLIB LSPTRES

FAT95_NAME = fat95
FAT95_KIND = handler
Expand All @@ -81,6 +87,12 @@ BOOT95_TARGET = $(TARGET_BOOT95)
LSFSRES_NAME = lsfsres
LSFSRES_KIND = tool
LSFSRES_TARGET = $(TARGET_LSFSRES)
# Bundled from the ptable repo.
PLIB_NAME = ptable.library
PLIB_KIND = library
LSPTRES_NAME = lsptres
LSPTRES_KIND = tool
LSPTRES_TARGET = dist/c/lsptres

# CPU tiers for the handler fan-out (tools stay single-tier).
CPUS = 68020 68000
Expand All @@ -89,7 +101,9 @@ CPUS = 68020 68000
define _artifact_entries
$(if $(filter tool,$($(1)_KIND)),\
$($(1)_NAME):$($(1)_TARGET):$($(1)_VERSION):$($(1)_DATE),\
$(foreach c,$(CPUS),$($(1)_NAME)_$(c):$(OUTDIR)/$(c)/$($(1)_NAME):$($(1)_VERSION):$($(1)_DATE)))
$(if $(filter library,$($(1)_KIND)),\
$(foreach c,$(CPUS),$($(1)_NAME)_$(c):dist/libs/$(c)/$($(1)_NAME):$($(1)_VERSION):$($(1)_DATE)),\
$(foreach c,$(CPUS),$($(1)_NAME)_$(c):$(OUTDIR)/$(c)/$($(1)_NAME):$($(1)_VERSION):$($(1)_DATE))))
endef

# "PREFIX|name|version|date" per component, fed to tools/components.sh
Expand Down Expand Up @@ -142,17 +156,16 @@ OUTDIR = dist/l
OUTDIR_020 = $(OUTDIR)/68020
OUTDIR_000 = $(OUTDIR)/68000

# Files: Driver (two CPU tiers)
# 68020+ ships under l/68020/ (A1200 stock + 68020+ accelerators
# 030/040/060/080). 68000 ships under l/68000/ for stock A500/A600/
# A1000/A2000/CDTV. Tools stay single-tier (68000) because they do
# no math hot-path work.
# ptable.library repo (override PTABLE= to point at a local checkout). Bundled
# into the release LIBS: so whole-disk auto-detect works without it in ROM.
PTABLE ?= extern/ptable
PTABLE_VERSION_FILE = $(PTABLE)/dist/ptable.version
PTABLE_LSPTRES_VERSION_FILE = $(PTABLE)/dist/lsptres.version

# Files: Driver
SOURCE = $(SRCDIR)/fat95.s
TARGET_020 = $(OUTDIR_020)/fat95
TARGET_000 = $(OUTDIR_000)/fat95
# TARGET retained as an alias for the 020+ binary for any downstream
# snippets that still reference it (e.g. tool-chain helpers).
TARGET = $(TARGET_020)
DRIVER_TARGETS = $(TARGET_020) $(TARGET_000)

# Files: Tools
Expand Down Expand Up @@ -203,9 +216,45 @@ $(VERSION_STAMP): FORCE
rm -f $(VERSION_STAMP).tmp; \
fi

# Rewrite the topmost release-notes header and the COMPONENTS block in
# docs/changes.md from current Makefile vars. Add new release headers by hand.
version-readme:
# Build ptable.library (small) + lsptres in the ptable repo and stage the
# built artifacts into dist/ for the release; nothing ptable-owned is rebuilt
# here, so every release ships the ptable-built bytes. MD2GUIDE/NDK are passed
# as absolute paths: the submodule's own relative defaults do not resolve from
# inside extern/ptable. Phony; a missing $(PTABLE) is a soft skip.
.PHONY: ptable-bundle
ptable-bundle:
$(Q)if [ -f "$(PTABLE)/Makefile" ]; then \
$(MAKE) -C "$(PTABLE)" all guides MD2GUIDE=$(abspath $(MD2GUIDE)) NDK=$(abspath NDK) >/dev/null; \
mkdir -p dist/libs/68020 dist/libs/68000 dist/c $(GUIDE_OUTPUT_DIR); \
cp "$(PTABLE)/dist/small/68020/ptable.library" dist/libs/68020/; \
cp "$(PTABLE)/dist/small/68000/ptable.library" dist/libs/68000/; \
cp "$(PTABLE)/dist/c/lsptres" dist/c/lsptres; \
cp "$(PTABLE)/dist/docs/lsptres.guide" $(GUIDE_OUTPUT_DIR)/; \
echo " bundled ptable.library (small) + lsptres from $(PTABLE)"; \
else \
echo " NOTE: $(PTABLE) absent - ptable.library / lsptres not bundled"; \
fi

# Move the ptable checkout to its upstream tip and rebuild everything that
# bundles it. Uses the branch tip rather than "git submodule update": if the
# recorded commit was orphaned by an upstream history rewrite, restoring the
# pin would fail. Leaves the result uncommitted for review. Phony; a $(PTABLE)
# that is not a git checkout is a soft skip.
.PHONY: ptable-sync
ptable-sync:
$(Q)if [ -e "$(PTABLE)/.git" ]; then \
git -C "$(PTABLE)" fetch origin; \
git -C "$(PTABLE)" checkout --detach origin/master; \
$(MAKE) all; \
echo " ptable synced to $$(git -C "$(PTABLE)" rev-parse --short HEAD) ($$(cat $(PTABLE_VERSION_FILE)))"; \
echo " review, then commit $(PTABLE) with the rebuilt dist/ artifacts"; \
else \
echo " NOTE: $(PTABLE) is not a git checkout - nothing to sync"; \
fi

# version-readme reads the ptable stamps for the PLIB/LSPTRES component versions,
# so the bundle (which builds them) must run first.
version-readme: ptable-bundle
$(Q)sed -i '0,/^## [0-9]\{8\}[^[:space:]]*/s/^## [0-9]\{8\}[^[:space:]]*/## $(VERSION)/' docs/changes.md
$(Q)block="_Components in this release_:\n\n$$(sh tools/components.sh md $(COMPONENT_ARGS))"; \
awk -v block="$$block" ' \
Expand Down Expand Up @@ -397,11 +446,18 @@ release: check-vasm version-readme all $(README_NAME) guide check-lha
cp src/*.s src/*.i "$$S/fat95/src/"; \
cp $(README_NAME) "$$S/fat95/fat95.readme"; \
cp $(README_INFO) LICENSE "$$S/fat95/"; \
if [ -d dist/libs ]; then \
cp -r dist/libs "$$S/fat95/"; \
echo " bundled ptable.library (small) + lsptres (staged by ptable-bundle)"; \
else \
echo " NOTE: $(PTABLE) absent - ptable.library / lsptres not bundled"; \
fi; \
mkdir -p "$$S/fat95/docs"; \
cp $(GUIDE_FAT95) "$$S/fat95/docs/"; \
cp $(GUIDE_CHANGES) "$$S/fat95/docs/"; \
cp $(GUIDE_DD) "$$S/fat95/docs/"; \
cp $(GUIDE_LSFSRES) "$$S/fat95/docs/"; \
[ -f $(GUIDE_LSPTRES) ] && cp $(GUIDE_LSPTRES) "$$S/fat95/docs/" || true; \
cp dist.info "$$S/fat95.info"; \
for d in dist/DOSDrivers dist/english dist/deutsch dist/magyar dist/polska dist/russian dist/espa* dist/fran*; do \
[ -d "$$d" ] && cp -r "$$d" "$$S/fat95/"; \
Expand All @@ -420,6 +476,7 @@ release: check-vasm version-readme all $(README_NAME) guide check-lha
clean:
rm -f $(DRIVER_TARGETS) $(TARGET_INSTALL95) $(TARGET_DD) $(TARGET_DEBUG95) $(TARGET_SETFILESIZE) $(TARGET_BOOT95) $(TARGET_LSFSRES)
rm -f $(VERSION_FAT95_INC) $(VERSION_INSTALL95_INC) $(VERSION_DD_INC) $(VERSION_DEBUG95_INC) $(VERSION_SETFILESIZE_INC) $(VERSION_BOOT95_INC) $(VERSION_LSFSRES_INC) $(VERSION_STAMP)
rm -rf dist/libs dist/c/lsptres $(GUIDE_LSPTRES)
$(Q)[ ! -d $(OUTDIR_020) ] || rmdir --ignore-fail-on-non-empty $(OUTDIR_020)
$(Q)[ ! -d $(OUTDIR_000) ] || rmdir --ignore-fail-on-non-empty $(OUTDIR_000)

Expand Down Expand Up @@ -450,6 +507,9 @@ help:
@echo "Documentation targets:"
@echo " guide / guides - Generate AmigaGuide documentation"
@echo ""
@echo "Dependency targets:"
@echo " ptable-sync - Move $(PTABLE) to its upstream tip and rebuild (uncommitted)"
@echo ""
@echo "Release targets:"
@echo " version-readme - Update current release notes in docs/changes.md"
@echo " readme - Generate $(README_NAME) from template"
Expand Down Expand Up @@ -484,8 +544,7 @@ GUIDE_FAT95 = $(GUIDE_OUTPUT_DIR)/fat95.guide
GUIDE_CHANGES = $(GUIDE_OUTPUT_DIR)/changes.guide
GUIDE_DD = $(GUIDE_OUTPUT_DIR)/dd.guide
GUIDE_LSFSRES = $(GUIDE_OUTPUT_DIR)/lsfsres.guide
# Backwards-compat alias for anything still referencing $(GUIDE_OUTPUT).
GUIDE_OUTPUT = $(GUIDE_FAT95)
GUIDE_LSPTRES = $(GUIDE_OUTPUT_DIR)/lsptres.guide
MD2GUIDE = ../cfd/tools/md2guide.py

guide guides: $(GUIDE_FAT95) $(GUIDE_CHANGES) $(GUIDE_DD) $(GUIDE_LSFSRES)
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Improvements to this handler are developed in my free time. If you'd like to sup
* Every AMIGA, OS 1.3+ (OS 2.0+ for full functionality)
* A suitable device file for low level disk access, like the
mfm.device for floppies, compactflash.device for CF in PCMCIA.
* `ptable.library` v2 (in ROM or `LIBS:`) for whole-disk auto-detect
mounts of MBR/GPT cards. Mountlist entries that give explicit
geometry, and unpartitioned (superfloppy) volumes, do not need it.

**Features**

Expand Down Expand Up @@ -183,6 +186,9 @@ Available options:
| `D` | Record "last accessed" date on file reads | ON |
| `l` | Show 8.3 filenames lowercase (e.g., "test.txt") | OFF |
| `L` | Show 8.3 filenames with uppercase initial (e.g., "Test.txt") | OFF |
| `q` | Quiet: never open error requesters (read/write/reinsert windows); errors are reported to the caller instead. Recommended for hot-plugged removable media | OFF |

Regardless of `q`, no requester is opened once the handler has been asked to quit (`ACTION_DIE`), so an unmount can never stall behind a window.

### Startup Options

Expand Down Expand Up @@ -453,6 +459,10 @@ The exact status shown may depend on the order of disk insertion and reinsertion
| `c/SetFileSize` | File size modification utility |
| `c/boot95` | Boot partition creation tool |
| `c/lsfsres` | FileSystem.resource entry lister |
| `c/lsptres` | partition.resource entry lister (from ptable.library) |
| `libs/<cpu>/ptable.library` | partition scan/automount library (small), bundled |

`ptable.library` and `lsptres` are built from the companion [amigaos-ptable](https://github.com/pulchart/amigaos-ptable) repo and bundled here so whole-disk auto-detect works without a separate install; `lsptres` lists `partition.resource` (the partition-side companion to `lsfsres`).

### dd

Expand Down Expand Up @@ -480,6 +490,10 @@ This installs an Amiga automount sequence in the unused area between the MBR and

Lists `FileSystem.resource` entries. See [docs/lsfsres.md](docs/lsfsres.md) for more details.

### lsptres

Lists `partition.resource` entries (bundled from ptable.library). The partition-side companion to `lsfsres`.

## License

GNU LGPL v2.1
43 changes: 25 additions & 18 deletions dist.readme.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Author: jaroslav.pulchart@gmail.com (Jaroslav Pulchart), based on work by
Type: disk/misc
Version: @VERSION@
Architecture: m68k-amigaos
Replaces: disk/misc/fat95.v20260609.lha
Replaces: disk/misc/fat95.v20260614.lha
Kurz: Win95/98-kompatibles Dateisystem

fat95 - Win95/98 compatible FAT filesystem handler for AmigaOS. Fork of disk/misc/fat95.lha.
Expand All @@ -16,25 +16,25 @@ COMPONENTS IN THIS RELEASE
WHAT'S NEW (@DATE@)
=======================

Tools:
fat95 handler:

This release is mainly a dd maintenance update. dd 2.2 adds TD64 support for
large-disk transfers, fixes unreliable NSD detection from the previous dd
release, and improves INSPECT output.
* New "q" (quiet) option: control "+q" silences all fat95 error
windows for a mount (errors go to the calling program instead).
Unmounting a removed card cancels any open window automatically.

dd 2.2:
* Support TD64 and harden NSD probe (fixes #20).
* INSPECT now shows a ">4GiB methods:" line listing which large-transfer
commands the device offers. Add VERBOSE to also print the device's
full command set.
* New CMD= option to force which command dd uses: AUTO (default), CMD,
TD64, NSCMD or SCSI. A forced command is used as-is, with no automatic
fallback.
* Shared partition scanning: fat95 auto-detects its FAT partition (MBR,
GPT, and flat whole-disk FAT) from the shared partition.resource
published by ptable.library, the same scan used by compactflash.device,
instead of scanning the partition table itself. The resolved mount
Flags/CONTROL are reported and shown by lsptres. Auto-detect now
requires ptable.library (bundled, install to LIBS:); explicit-geometry
mountlist entries still mount without it.

dd 2.1:
* On Kickstart older than 2.0 (V36), dd now prints a short message
saying it needs Kickstart 2.0+ and exits, instead of failing silently.
* Console output now uses VFPrintf.
Bundled:

* ptable.library and lsptres are now included in the archive, shared with
the CompactFlash driver. lsptres lists partition.resource.
Library: https://github.com/pulchart/amigaos-ptable

Purpose
=======
Expand All @@ -48,6 +48,8 @@ System requirements
* every AMIGA, OS 1.3+ (OS 2.0+ for full functionality)
* a suitable device file for low level disk access, like the
mfm.device for floppies, compactflash.device for CF in PCMCIA
* ptable.library (bundled; install to LIBS:) for partition auto-detect;
explicit-geometry mountlist entries do not need it

Features
========
Expand All @@ -57,7 +59,7 @@ See fat95.guide for full documentation.
* Workbench and applications support
* Diskchange autosense
* Format type autosense: FAT12, FAT16 and FAT32
* MBR and GPT partition table support
* MBR, GPT, and flat (whole-disk FAT) partition support
* Simple LINUX style partition selection or manual definition
* Up to 4 GBytes of partition size for FAT16
* Large harddisk support via TD64 or direct SCSI
Expand Down Expand Up @@ -101,6 +103,7 @@ fat95/docs/fat95.guide - FAT95 filesystem handler documentation
fat95/docs/changes.guide - Release notes and original fat95 history
fat95/docs/dd.guide - dd raw block transfer tool documentation
fat95/docs/lsfsres.guide - lsfsres FileSystem.resource lister documentation
fat95/docs/lsptres.guide - lsptres partition.resource lister documentation

fat95/l/68020/fat95 - FAT95 filesystem handler, 68020+ cpu tier
fat95/l/68000/fat95 - FAT95 filesystem handler, 68000+ cpu tier
Expand All @@ -110,6 +113,10 @@ fat95/c/debug95 - Debug information tool
fat95/c/SetFileSize - File size modification utility
fat95/c/boot95 - Boot partition creation tool
fat95/c/lsfsres - FileSystem.resource entry lister
fat95/c/lsptres - partition.resource entry lister (from ptable.library)

fat95/libs/68020/ptable.library - partition scan/automount library, 68020+ (small)
fat95/libs/68000/ptable.library - partition scan/automount library, 68000+ (small)

fat95/DOSDrivers/ - Mount list examples

Expand Down
3 changes: 3 additions & 0 deletions dist/c/lsptres
Git LFS file not shown
46 changes: 43 additions & 3 deletions dist/docs/changes.guide
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@database "fat95 release notes"
@$VER: fat95 release notes guide 20260614 (14.06.2026)
@author "Generated by md2guide.py v1.5 (20.05.2026)"
@$VER: fat95 release notes guide 20260730-dev (30.07.2026)
@author "Generated by md2guide.py v1.6 (14.06.2026)"
@(c) "See LICENSE"
@font topaz.font 8
@help Main
Expand All @@ -10,6 +10,7 @@

@{b}fat95 release notes@{ub}

@{"20260730-dev" link 20260730_dev}
@{"20260614" link 20260614}
@{"20260609" link 20260609}
@{"3.23 (19.05.2026)" link 3_23__19_05_2026_}
Expand All @@ -26,6 +27,7 @@

@{"20260609" link 20260609}
@{"20260614" link 20260614}
@{"20260730-dev" link 20260730_dev}
@{"3.19 (01.02.2026)" link 3_19__01_02_2026_}
@{"3.20 (16.03.2026)" link 3_20__16_03_2026_}
@{"3.21 (18.04.2026)" link 3_21__18_04_2026_}
Expand All @@ -36,6 +38,44 @@

@endnode

@node 20260730_dev "20260730-dev"
@{b}20260730-dev@{ub}

@{i}Components in this release@{ui}:

* @{fg shine}fat95 4.0-dev (30.07.2026)@{fg text} @{i}(new)@{ui}
* @{fg shine}install95 3.19 (25.01.2026)@{fg text}
* @{fg shine}dd 2.2 (13.06.2026)@{fg text}
* @{fg shine}debug95 3.19 (25.01.2026)@{fg text}
* @{fg shine}SetFileSize 1.1 (25.01.2026)@{fg text}
* @{fg shine}boot95 3.19 (25.01.2026)@{fg text}
* @{fg shine}lsfsres 1.0 (16.05.2026)@{fg text}
* @{fg shine}ptable.library 2.0-dev (30.07.2026)@{fg text} @{i}(new)@{ui}
* @{fg shine}lsptres 1.0-dev (30.07.2026)@{fg text} @{i}(new)@{ui}

@{b}fat95 handler@{ub}

* @{b}New @{fg shine}q@{fg text} (quiet) option.@{ub} Control @{fg shine}"+q"@{fg text} silences all fat95 error windows for a
mount (errors go to the calling program instead). Unmounting a removed card
now cancels any open window automatically.
* @{b}Shared partition scanning.@{ub} fat95 auto-detects its FAT partition (MBR, GPT, and
flat whole-disk FAT) from the shared @{fg shine}partition.resource@{fg text} published by
@{fg shine}ptable.library@{fg text} , the same scan used by @{fg shine}compactflash.device@{fg text} , instead of
scanning the partition table itself. The resolved mount Flags/CONTROL are
reported and shown by @{fg shine}lsptres@{fg text} . Auto-detect now requires @{fg shine}ptable.library@{fg text}
(bundled, install to @{fg shine}LIBS:@{fg text} ); explicit-geometry mountlist entries still mount
without it. See @{" ptable.guide " link "ptable.guide/Main"} and @{" lsptres.guide " link "lsptres.guide/Main"} .

@{b}Tools@{ub}

* @{fg shine}ptable.library@{fg text} and @{fg shine}lsptres@{fg text} are now bundled in the archive, shared with the
CompactFlash driver. @{fg shine}lsptres@{fg text} lists @{fg shine}partition.resource@{fg text} .

----------------------------------------
@{"<< Prev" link Main} @{"Contents" link Main} @{"Next >>" link 20260614}

@endnode

@node 20260614 "20260614"
@{b}20260614@{ub}

Expand Down Expand Up @@ -73,7 +113,7 @@ IO (transfer) command usage changes:
* Console output now uses @{fg shine}VFPrintf@{fg text}.

----------------------------------------
@{"<< Prev" link Main} @{"Contents" link Main} @{"Next >>" link 20260609}
@{"<< Prev" link 20260730_dev} @{"Contents" link Main} @{"Next >>" link 20260609}

@endnode

Expand Down
Loading