A score is written and a tune is what the machine reads
The convention, at the user's asking, and it is the one this project already has everywhere else: a .asm is written and a .sbx or a .bin is what the machine loads. A .score and a .tune are the same pair one subject along. It is not only tidiness. I read the user's splash.tune as a compiled tune yesterday, dumped its header, and got a tick of seven and a half million cycles and ninety seven patches out of what was plainly a text file. Different names make that a thing nobody has to notice. AND THE SPLASH WAS SILENT ON THE DISK THAT MATTERS. The play disk mirrors every .asm and puts every app, and nothing on it put a compiled tune - so make run-cosmos and make run-voyager both booted a Lander that read /splash.tune, did not find one, and held the logo in silence. Only the test disk had it, because I had added it there and stopped. The makefile now compiles Programs/Tunes/splash.score with TuneC and puts the result on the disk, and the mirror's prerequisite list learned about .score files so that changing the music rebuilds the disk. That is the same failure the mirror was built for, in a file type the mirror did not know about yet: tune.asm went into Examples once, the image was not remade, and it was simply not there. Measured on the real disk: music from 0.9 s to 9.6 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
00b31b88af
commit
dfc9d9ef7f
@@ -149,6 +149,8 @@ PROG_BUILD = $(PROG_DIR)/build
|
||||
# The tools, as commands. Built by the rules above, and named here so the assembly rules
|
||||
# read the way the shell would.
|
||||
ASM_RUN = ./$(ASM_TARGET)
|
||||
PATCH_RUN = ./$(PATCH_TARGET)
|
||||
TUNE_RUN = ./$(TUNE_TARGET)
|
||||
EMU_RUN = ./$(EMU_TARGET)
|
||||
VOY_RUN = ./$(VOY_TARGET)
|
||||
DISKTOOL = ./$(DSK_TARGET)
|
||||
@@ -583,13 +585,14 @@ $(COSMOS_DISK): makefile
|
||||
#
|
||||
# Found rather than wildcarded, because the tree the mirror walks is a tree and $(wildcard)
|
||||
# does not recurse. build is left out for the reason the mirror leaves it out.
|
||||
MIRRORED := $(shell find $(PROG_DIR) -name '*.asm' -not -path '$(PROG_BUILD)/*' 2>/dev/null)
|
||||
MIRRORED := $(shell find $(PROG_DIR) \( -name '*.asm' -o -name '*.score' \) -not -path '$(PROG_BUILD)/*' 2>/dev/null)
|
||||
$(COSMOS_DISK): $(MIRRORED)
|
||||
$(COSMOS_DISK): $(APPS) $(NATIVE_ASM) $(COSMOS) $(STAGE2) \
|
||||
$(PROG_DIR)/testPrograms/stringKeyword.asm \
|
||||
$(wildcard $(PROG_DIR)/CosmOS/Apps/*.asm) \
|
||||
$(wildcard $(PROG_DIR)/CosmOS/Source/*.asm) \
|
||||
$(wildcard $(PROG_DIR)/CosmOS/Assembler/*.asm) | $(DSK_TARGET)
|
||||
$(wildcard $(PROG_DIR)/CosmOS/Assembler/*.asm) \
|
||||
| $(DSK_TARGET) $(PATCH_TARGET) $(TUNE_TARGET)
|
||||
@mkdir -p $(@D)
|
||||
rm -f $@
|
||||
@# A BOOT AREA, so that this is a disk the machine can start itself from rather than
|
||||
@@ -630,6 +633,17 @@ $(COSMOS_DISK): $(APPS) $(NATIVE_ASM) $(COSMOS) $(STAGE2) \
|
||||
@for app in $(APPS); do \
|
||||
$(DISKTOOL) put $@ $$app /Apps/`basename $$app` >/dev/null || exit 1; done
|
||||
$(DISKTOOL) put $@ $(NATIVE_ASM) /Apps/Asm.sbx
|
||||
@# ---- And the music, compiled ----
|
||||
@#
|
||||
@# A .score is written and a .tune is what the machine reads, the same way a .asm is
|
||||
@# written and a .sbx is what it loads. The patches come from SoundPatch, which stays the
|
||||
@# only thing that knows what a soundThing patch means; TuneC embeds the bytes and knows
|
||||
@# nothing about them.
|
||||
@mkdir -p $(PROG_BUILD)/tunes
|
||||
$(PATCH_RUN) --blob $(PROG_DIR)/Sounds/Oboe.json Oboe $(PROG_BUILD)/tunes/oboe.patch
|
||||
$(TUNE_RUN) -I $(PROG_BUILD)/tunes $(PROG_DIR)/Tunes/splash.score \
|
||||
$(PROG_BUILD)/tunes/splash.tune
|
||||
$(DISKTOOL) put $@ $(PROG_BUILD)/tunes/splash.tune splash.tune
|
||||
@# ---- What you assemble: all of it ----
|
||||
@#
|
||||
@# MIRRORED RATHER THAN LISTED. A list in a makefile goes stale the moment somebody
|
||||
|
||||
Reference in New Issue
Block a user