Sync VCC Plus 3.7.1 build 67 source
Refresh reviewed MCP output export, four-drive owned playtests, bounded BASIC readiness, and pinned CMOC 0.1.101 source/patches. Preserve independent source-edition identity, empty libraries, notices and privacy boundaries. Validated 74 export/privacy checks, pinned dependency sources, and an independent unsigned universal Release build. A subsequent documentation-only correction removes an excluded qualification link; all build inputs remain identical.
This commit is contained in:
1 parent
4abc194001
commit
5534005799
54 files changed
+2950
-435
No files matched your search
@@ -26,6 +26,9 @@ def main():
|
||||
shutil.copytree(ROOT/'third_party/cmoc-libraries'/name,out/name)
|
||||
subprocess.run(['make','-j4',f'lib{name}.a'],cwd=out/name,env=env,check=True)
|
||||
game=out/'game';shutil.copytree(ROOT/'third_party/examples/coco-letters',game)
|
||||
# Preserve the old ascending layout, using the new explicit spelling.
|
||||
recipe=game/'Makefile'
|
||||
recipe.write_text(recipe.read_text().replace('--allocate-before-dir','--allocate-forward'))
|
||||
# Upstream generates two outputs in one rule; serial make avoids duplicate writes.
|
||||
subprocess.run(['make','DECBFILE_LIB_DIR=../decbfile','BCONTROL_LIB_DIR=../bcontrol','BSOUND_LIB_DIR=../bsound'],cwd=game,env=env,check=True)
|
||||
disk=game/'coco-letters-0.1.0.dsk'
|
||||
|
||||
@@ -66,8 +66,8 @@ def main():
|
||||
'MCPP-LICENSE.txt': 'mcpp/LICENSE', 'MAKE-COPYING.txt': 'make/COPYING'}
|
||||
for target, source in notices.items(): shutil.copyfile(ROOT / 'third_party' / source, bundle / 'LICENSES' / target)
|
||||
shutil.copyfile(ROOT / 'tools/toolchain/patches/README.md', bundle / 'LICENSES/CMOC-VCC-EXTENSIONS.txt')
|
||||
record = {'schemaVersion': 1, 'cmoc': '0.1.100', 'lwtools': '4.25', 'mcpp': '2.7.2',
|
||||
'make': '4.4.1', 'vccDebugMetadata': 1, 'vccAddZeroFlagsFix': 1, 'vccIndexedByteSubtractionFix': 1, 'vccIndexedArgumentLoadFix': 1, 'vccWriteCoCoFileBeforeDir': 1, 'vccLWASMProjectInputs': 1, 'architectures': architectures, 'privateRuntimeInputs': False,
|
||||
record = {'schemaVersion': 1, 'cmoc': json.loads((ROOT / 'third_party/manifests/cmoc.json').read_text())['version'], 'lwtools': '4.25', 'mcpp': '2.7.2',
|
||||
'make': '4.4.1', 'vccDebugMetadata': 1, 'vccAddZeroFlagsFix': 1, 'vccIndexedByteSubtractionFix': 1, 'vccIndexedArgumentLoadFix': 1, 'vccWriteCoCoFileForward': 1, 'writeCoCoFileAllocation': 'upstream', 'vccLWASMProjectInputs': 1, 'architectures': architectures, 'privateRuntimeInputs': False,
|
||||
'minimumMacOS': '14.0', 'appleDeveloperToolsRequiredAtRuntime': False}
|
||||
(bundle / 'manifest.json').write_text(json.dumps(record, indent=2) + '\n')
|
||||
perl_output = output / 'perl'
|
||||
|
||||
@@ -61,6 +61,8 @@ def main():
|
||||
build/'Build/Products/Release/libVCCCore.a', args.rom.resolve())
|
||||
run('python3', ROOT/'tests/toolchain/indexed-arguments/check.py', prefix,
|
||||
build/'Build/Products/Release/libVCCCore.a', args.rom.resolve())
|
||||
run('python3', ROOT/'tests/toolchain/cmoc-0.1.101/check.py', prefix,
|
||||
build/'Build/Products/Release/libVCCCore.a', args.rom.resolve())
|
||||
if features['mc6839']:
|
||||
run(out/'run-compiled',args.rom.resolve(),out/'FLOAT.BIN','MC6839 MATH OK')
|
||||
if args.game_disk:
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# Local CMOC compiler patches
|
||||
|
||||
The descriptions below retain each patch's original 0.1.100 history. On November
|
||||
16, 2026, the four compiler patches were reapplied and qualified against CMOC
|
||||
0.1.101, including its refactored instruction-effects analysis. The allocator
|
||||
patch was replaced as documented below.
|
||||
|
||||
`cmoc-debug-metadata.patch` is an original VCC Plus extension to CMOC 0.1.100,
|
||||
modified November 3, 2026 and licensed GPL-3.0-or-later. It is applied to the ignored build copy by
|
||||
`tools/toolchain/build.py`; the pinned upstream snapshot and its checksums stay
|
||||
@@ -69,19 +74,13 @@ Packaged runtimes identify the change with `vccIndexedArgumentLoadFix: 1`.
|
||||
|
||||
The [guest regression](../../../tests/toolchain/logical-negation.c) prints actual results for zero, widened unsigned bytes and 16-bit values. Run `tools/toolchain/check.py --rom` with a local CoCo 3 ROM to check those results at `-O0` and `-O2` on MC6809 and HD6309. Rebuilt app toolchains record `vccAddZeroFlagsFix: 1` in the manifest.
|
||||
|
||||
## Explicit before-directory disk allocation
|
||||
## Explicit allocation
|
||||
|
||||
`writecocofile-before-dir.patch` (November 4, 2026, GPL-3.0-or-later) adds
|
||||
`--allocate-before-dir` as an explicit choice of the existing forward allocator.
|
||||
It starts at granule zero, skips occupied granules, and continues above the
|
||||
directory track if necessary. It does not imply a strict below-directory limit.
|
||||
The last allocation option wins, as with the existing choices.
|
||||
`writecocofile-before-dir.patch` now adds `--allocate-forward`, preserving the
|
||||
old ascending layout. The original option now follows upstream.
|
||||
|
||||
`build.py` applies it only to the build copy. `build-runtime.py` records
|
||||
`vccWriteCoCoFileBeforeDir: 1`. The original CoCo Letters Makefile uses this option;
|
||||
its former recipe-removal patch is retired and the vendored game matches upstream.
|
||||
Runtime verification checks allocation order, byte-identical default behavior,
|
||||
file readback, and spillover beyond the lower half of the disk.
|
||||
The `--allocate-before-dir` meaning changed: it now starts at 33 and descends,
|
||||
then wraps. Callers needing the old layout must migrate.
|
||||
|
||||
## LWASM project input boundary
|
||||
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
--- a/src/writecocofile.cpp
|
||||
+++ b/src/writecocofile.cpp
|
||||
@@ -1,3 +1,8 @@
|
||||
+/* VCC Plus modification, November 4, 2026: support an explicit
|
||||
+ --allocate-before-dir option using the existing forward allocator.
|
||||
+ This modification is licensed GPL-3.0-or-later.
|
||||
@@ -1,3 +1,7 @@
|
||||
+/* VCC Plus: explicit forward allocation, November 16, 2026.
|
||||
+ GPL-3.0-or-later.
|
||||
+*/
|
||||
+
|
||||
/* writecocofile.cpp - A tool to write native files to a CoCo DECB disk image.
|
||||
Copyright (C) 2003-2026 Pierre Sarrazin <http://sarrazip.com/>
|
||||
|
||||
@@ -874,6 +879,8 @@
|
||||
"--kill|-k Kill the designated file.\n"
|
||||
"--read|-r Read instead of writing. Refuses to overwrite existing native file.\n"
|
||||
"--stdout|-s Like --read, but print file contents on standard out.\n"
|
||||
+ "--allocate-before-dir Allocate from granule zero (the default), preferring space\n"
|
||||
+ " before the directory, then continuing above it if needed.\n"
|
||||
"--allocate-after-dir When adding a file, allocate granules after the directory track,\n"
|
||||
" then continue allocating below that track if needed.\n"
|
||||
"--allocate-from-end When adding a file, allocate granules from the end.\n"
|
||||
@@ -1376,6 +1383,11 @@
|
||||
@@ -897,6 +901,7 @@
|
||||
"--kill|-k Kill the designated file.\n"
|
||||
"--read|-r Read instead of writing. Refuses to overwrite existing native file.\n"
|
||||
"--stdout|-s Like --read, but print file contents on standard out.\n"
|
||||
+ "--allocate-forward Allocate from granule zero (the default).\n"
|
||||
"--allocate-after-dir When adding a file, allocate granules after the directory track,\n"
|
||||
" then continue allocating below that track if needed.\n"
|
||||
"--allocate-before-dir When adding a file, allocate granules before the directory track,\n"
|
||||
@@ -1401,6 +1406,11 @@
|
||||
granuleAllocator.reset(new BackwardGranuleAllocator());
|
||||
continue;
|
||||
}
|
||||
+ if (curopt == "--allocate-before-dir")
|
||||
+ if (curopt == "--allocate-forward")
|
||||
+ {
|
||||
+ granuleAllocator.reset(new ForwardGranuleAllocator());
|
||||
+ continue;
|
||||
|
||||
@@ -37,6 +37,7 @@ def main():
|
||||
upstream = (output / 'Makefile').read_text()
|
||||
original = '$(DATA_FILENAME) $(WORD_LENGTH_FILENAME): $(BUILD_DATA)'
|
||||
if upstream.count(original) != 1: raise SystemExit('Review updated dictionary generation rule')
|
||||
upstream = upstream.replace('--allocate-before-dir','--allocate-forward')
|
||||
upstream = upstream.replace(original, '$(DATA_FILENAME) $(WORD_LENGTH_FILENAME) &: $(BUILD_DATA)')
|
||||
(output / 'Game.mk').write_text(upstream)
|
||||
for name in ('decbfile', 'bcontrol', 'bsound'):
|
||||
|
||||
@@ -36,29 +36,50 @@ def check_assembly(runtime, folder):
|
||||
raise SystemExit('Unexpected LWASM result for escaping ' + directive + ': ' + failure.stderr)
|
||||
|
||||
def check_disk_allocation(runtime, folder):
|
||||
"""The explicit before-dir option must match the existing forward allocator."""
|
||||
"""Check complete FAT order, including spillover and option precedence."""
|
||||
folder.mkdir()
|
||||
tool = str(runtime / 'bin/writecocofile')
|
||||
payload = folder / 'DATA.DAT'
|
||||
payload.write_bytes(bytes(range(256)) * (35 * 9)) # 35 granules: spills above track 17.
|
||||
images = []
|
||||
for name, options, first in [('default', [], 0), ('before', ['--allocate-before-dir'], 0),
|
||||
('after', ['--allocate-after-dir'], 34),
|
||||
('last-option', ['--allocate-after-dir', '--allocate-before-dir'], 0)]:
|
||||
image = folder / (name + '.dsk')
|
||||
image.write_bytes(b'\xff' * (35 * 18 * 256))
|
||||
subprocess.run([tool, *options, str(image), str(payload)], check=True, stdout=subprocess.DEVNULL)
|
||||
content = image.read_bytes()
|
||||
entry = 17 * 18 * 256 + 2 * 256
|
||||
if content[entry + 13] != first:
|
||||
raise SystemExit('Incorrect disk allocation start: ' + name)
|
||||
restored = subprocess.check_output([tool, '--stdout', str(image), 'DATA.DAT'])
|
||||
if restored != payload.read_bytes():
|
||||
raise SystemExit('Disk allocation readback mismatch: ' + name)
|
||||
images.append(content)
|
||||
if images[0] != images[1] or images[0] != images[3]:
|
||||
raise SystemExit('Before-directory option changed default allocation semantics')
|
||||
|
||||
forward = list(range(68))
|
||||
before = list(range(33,-1,-1)) + list(range(34,68))
|
||||
after = list(range(34,68)) + list(range(33,-1,-1))
|
||||
end = list(range(67,-1,-1))
|
||||
def chain(content, entry=0):
|
||||
fat = content[17*18*256+256:17*18*256+256+68]
|
||||
current = content[17*18*256+2*256+13+32*entry]
|
||||
result = []
|
||||
while current < 68:
|
||||
if current in result: raise SystemExit('Allocation cycle')
|
||||
result.append(current)
|
||||
current = fat[current]
|
||||
if not 0xc0 <= current <= 0xc9: raise SystemExit('Invalid allocation end')
|
||||
return result
|
||||
def image(name, options, size):
|
||||
payload.write_bytes(bytes(range(256)) * (size*9))
|
||||
path = folder/(name+'.dsk')
|
||||
path.write_bytes(b'\xff'*(35*18*256))
|
||||
subprocess.run([tool,*options,str(path),str(payload)],check=True,stdout=subprocess.DEVNULL)
|
||||
if subprocess.check_output([tool,'--stdout',str(path),'DATA.DAT']) != payload.read_bytes():
|
||||
raise SystemExit('Readback mismatch')
|
||||
return path
|
||||
for name, options, order in [('default',[],forward),('forward',['--allocate-forward'],forward),
|
||||
('before',['--allocate-before-dir'],before),('after',['--allocate-after-dir'],after),
|
||||
('end',['--allocate-from-end'],end),('last',['--allocate-after-dir','--allocate-before-dir'],before),
|
||||
('last-forward',['--allocate-before-dir','--allocate-forward'],forward)]:
|
||||
for size in [1,35,68]:
|
||||
path=image(name,options,size)
|
||||
if chain(path.read_bytes()) != order[:size]: raise SystemExit('Order mismatch')
|
||||
full=image('full',[],68)
|
||||
extra=folder/'EXTRA.DAT'
|
||||
extra.write_bytes(b'x')
|
||||
original=full.read_bytes()
|
||||
fail=subprocess.run([tool,str(full),str(extra)],capture_output=True)
|
||||
if fail.returncode==0 or full.read_bytes()!=original: raise SystemExit('Full disk changed')
|
||||
for name,options,order in [('forward',['--allocate-forward'],forward),('before',['--allocate-before-dir'],before)]:
|
||||
path=image('occupied',options,1)
|
||||
subprocess.run([tool,*options,str(path),str(extra)],check=True,stdout=subprocess.DEVNULL)
|
||||
if chain(path.read_bytes())!=order[:1] or chain(path.read_bytes(),1)!=order[1:2]:
|
||||
raise SystemExit('Occupied granule changed')
|
||||
def check_guest_example(runtime, env, folder, project_name, payloads):
|
||||
"""Build an editable example and compare its guest disk files with the build outputs."""
|
||||
source = Path(__file__).resolve().parents[2] / "examples/cmoc" / project_name
|
||||
|
||||
Reference in new issue
Block a user