Put a disk of your own in drive 1

make run-voyager and make run-cosmos now attach Disks/personal.img as the
second drive. It is made the first time it is wanted and then left alone:
a rule with no prerequisites, so make never looks at it again.

NOT UNDER build/, and that is the whole point. Everything else in this
repository is made from source and can be thrown away without losing
anything, so 'clean' empties build/ without a thought - and a disk of your
own that a clean deletes is not a disk of your own. It is the one place
here where something MADE ON THE MACHINE can live, which starts to matter
the moment there are tools on it that make things.

Disks/ is in .gitignore for the same reason: what you make on the machine
is yours and not the repository's.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-08-31 16:45:17 -04:00
co-authored by Claude Opus 5
parent e4f4bae762
commit 3e48e9690d
4 changed files with 46 additions and 8 deletions
+4
View File
@@ -36,3 +36,7 @@ Source/Emulator/rom.c
# their own build outputs and their own compiled binaries. What this repository takes from # their own build outputs and their own compiled binaries. What this repository takes from
# them gets vendored deliberately, with a note saying where it came from. # them gets vendored deliberately, with a note saying where it came from.
/External/ /External/
# The personal disk 'make run-voyager' puts in drive 1. Made on demand, never rebuilt, and
# not cleaned - it is the one place in here where something made ON the machine can live.
/Disks/
+12
View File
@@ -841,6 +841,18 @@ file` - which it is, since there is nowhere for the rest of it to be.
remembers the drive it was opened on and returns there for each block. Between them the copy remembers the drive it was opened on and returns there for each block. Between them the copy
walks back and forth without `Copy` itself knowing there is more than one disk. walks back and forth without `Copy` itself knowing there is more than one disk.
### A Disk Of Your Own:
`make run-voyager` puts a second disk in **drive 1**, at `Disks/personal.img`. It is made the
first time it is needed and then left alone: never rebuilt, never cleaned, never committed.
That last part is the point. Everything else in this repository is made from source and can be
thrown away without losing anything - but a disk is where something *made on the machine*
lives, and a disk that `make clean` deletes is not a disk of your own. It sits outside
`build/` for exactly that reason, and `Disks/` is in `.gitignore`.
Delete it by hand if you ever want a fresh one.
### Where A Program Is Looked For: ### Where A Program Is Looked For:
Three places, tried in order: Three places, tried in order:
+4
View File
@@ -142,6 +142,10 @@ make run-voyager
`make` builds a disk as well as the tools, so there is one to boot. `make run-cosmos` is the `make` builds a disk as well as the tools, so there is one to boot. `make run-cosmos` is the
same system in the terminal, for a machine with no graphics library. same system in the terminal, for a machine with no graphics library.
Both put a second disk in drive 1, at `Disks/personal.img`. It is made once and then never
rebuilt, cleaned or committed: everything else here can be thrown away and made again from
source, and that one is where anything made ON the machine lives.
Then `dir` to see what is there, `load Snake.sbx` and `run` to play something, or `load Asm.sbx` and `run cosmos.asm` to watch the machine build itself. Then `dir` to see what is there, `load Snake.sbx` and `run` to play something, or `load Asm.sbx` and `run cosmos.asm` to watch the machine build itself.
Every source in `Programs/` is on that disk, under `/Source`, so anything not shipped as a Every source in `Programs/` is on that disk, under `/Source`, so anything not shipped as a
+26 -8
View File
@@ -160,6 +160,18 @@ APPS = $(patsubst $(PROG_DIR)/CosmOS/Apps/%.asm,$(PROG_BUILD)/CosmOS/Apps
$(wildcard $(PROG_DIR)/CosmOS/Apps/*.asm)) $(wildcard $(PROG_DIR)/CosmOS/Apps/*.asm))
COSMOS_DISK = $(PROG_BUILD)/cosmos.img COSMOS_DISK = $(PROG_BUILD)/cosmos.img
# ---- A disk that is yours ----
#
# Drive 1 whenever the system is run, and the only thing in this repository that is never
# rebuilt, never cleaned and never committed. Everything else here is made from source and
# can be thrown away without losing anything; this is the one place where something MADE ON
# THE MACHINE can live, which matters more the moment there are tools on it that make things.
#
# NOT UNDER build/, which is the whole point. 'make clean' empties that, and a disk of your
# own that a clean deletes is not a disk of your own. It is a rule with no prerequisites, so
# once it exists make never looks at it again.
PERSONAL_DISK = Disks/personal.img
# VOYAGER IS NOT IN THE HARD LIST. Everything below it - the assembler, the disk tool, the # VOYAGER IS NOT IN THE HARD LIST. Everything below it - the assembler, the disk tool, the
# linter, the whole test suite - has to build on a machine with no graphics library at all, # linter, the whole test suite - has to build on a machine with no graphics library at all,
@@ -589,14 +601,20 @@ disk: $(COSMOS) $(COSMOS_DISK)
# THE MACHINE STARTS ITSELF. No image is named, so the emulator shadows its ROM into Program # THE MACHINE STARTS ITSELF. No image is named, so the emulator shadows its ROM into Program
# Memory and that reads the disk for everything else - a boot slot, then a loader, then # Memory and that reads the disk for everything else - a boot slot, then a loader, then
# whatever /System/Boot/boot.cfg names, or cosmos.bin when it names nothing. # whatever /System/Boot/boot.cfg names, or cosmos.bin when it names nothing.
run-cosmos: $(COSMOS_DISK) $(PERSONAL_DISK):
$(EMU_RUN) --disk $(COSMOS_DISK) @mkdir -p $(@D)
$(DISKTOOL) format $@ 2048 8
@echo " That disk is yours. It is drive 1, and nothing in this makefile will touch it"
@echo " again - not clean, not a rebuild. Delete it by hand if you want a new one."
run-cosmos: $(COSMOS_DISK) $(PERSONAL_DISK)
$(EMU_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK)
# The same disk with the system handed over directly instead, which is what a debugger does: # The same disk with the system handed over directly instead, which is what a debugger does:
# memory is placed from outside and nothing on the disk is consulted about it. Useful when the # memory is placed from outside and nothing on the disk is consulted about it. Useful when the
# thing being debugged is the boot chain itself, since it skips the boot chain. # thing being debugged is the boot chain itself, since it skips the boot chain.
run-cosmos-direct: $(COSMOS) $(COSMOS_DISK) run-cosmos-direct: $(COSMOS) $(COSMOS_DISK) $(PERSONAL_DISK)
$(EMU_RUN) --disk $(COSMOS_DISK) $(COSMOS) $(EMU_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) $(COSMOS)
# ---- The same disk, on the machine with a screen ---- # ---- The same disk, on the machine with a screen ----
# #
@@ -607,11 +625,11 @@ run-cosmos-direct: $(COSMOS) $(COSMOS_DISK)
# was built when the disk was made, so a machine whose console has changed will happily boot # was built when the disk was made, so a machine whose console has changed will happily boot
# an image full of programs written for the old one - and they will draw whatever the old way # an image full of programs written for the old one - and they will draw whatever the old way
# now means. Making the disk a dependency of running it is what stops that being a puzzle. # now means. Making the disk a dependency of running it is what stops that being a puzzle.
run-voyager: $(COSMOS_DISK) run-voyager: $(COSMOS_DISK) $(PERSONAL_DISK)
$(VOY_RUN) --disk $(COSMOS_DISK) $(VOY_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK)
run-voyager-direct: $(COSMOS) $(COSMOS_DISK) run-voyager-direct: $(COSMOS) $(COSMOS_DISK) $(PERSONAL_DISK)
$(VOY_RUN) --disk $(COSMOS_DISK) $(COSMOS) $(VOY_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) $(COSMOS)
# Pull in the dependency rules the assembler wrote with -M, so that touching a library # Pull in the dependency rules the assembler wrote with -M, so that touching a library
# reassembles every program that includes it. # reassembles every program that includes it.