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:
co-authored by
Claude Opus 5
parent
e4f4bae762
commit
3e48e9690d
@@ -160,6 +160,18 @@ APPS = $(patsubst $(PROG_DIR)/CosmOS/Apps/%.asm,$(PROG_BUILD)/CosmOS/Apps
|
||||
$(wildcard $(PROG_DIR)/CosmOS/Apps/*.asm))
|
||||
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
|
||||
# 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
|
||||
# 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.
|
||||
run-cosmos: $(COSMOS_DISK)
|
||||
$(EMU_RUN) --disk $(COSMOS_DISK)
|
||||
$(PERSONAL_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:
|
||||
# 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.
|
||||
run-cosmos-direct: $(COSMOS) $(COSMOS_DISK)
|
||||
$(EMU_RUN) --disk $(COSMOS_DISK) $(COSMOS)
|
||||
run-cosmos-direct: $(COSMOS) $(COSMOS_DISK) $(PERSONAL_DISK)
|
||||
$(EMU_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) $(COSMOS)
|
||||
|
||||
# ---- 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
|
||||
# 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.
|
||||
run-voyager: $(COSMOS_DISK)
|
||||
$(VOY_RUN) --disk $(COSMOS_DISK)
|
||||
run-voyager: $(COSMOS_DISK) $(PERSONAL_DISK)
|
||||
$(VOY_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK)
|
||||
|
||||
run-voyager-direct: $(COSMOS) $(COSMOS_DISK)
|
||||
$(VOY_RUN) --disk $(COSMOS_DISK) $(COSMOS)
|
||||
run-voyager-direct: $(COSMOS) $(COSMOS_DISK) $(PERSONAL_DISK)
|
||||
$(VOY_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) $(COSMOS)
|
||||
|
||||
# Pull in the dependency rules the assembler wrote with -M, so that touching a library
|
||||
# reassembles every program that includes it.
|
||||
|
||||
Reference in New Issue
Block a user