Skip to content

DiscoC v0.3.0

Latest

Choose a tag to compare

@DiscoManOfficial DiscoManOfficial released this 17 Nov 14:06

DiscoC v0.3.0

DiscoC v0.3.0 adds checked GSU address and stack proofs, optional short RAM,
backend optimizations and revised SNES demonstrations. It remains an
experimental pre-1.0 toolchain implementing Language Baseline 0.1, not ISO C.

The release source is
406e1157d765eebff87b9d3c8eda62a0bc17864a.
The native packages, exact-source archive and final validation receipts identify
this revision. The dated preparation record
retains its original source identities and measurement scope.

Changes since 0.2.0

  • Checked address proofs: bounded facts for known static RAM objects,
    validated frames and same-object ROM tables remove redundant guards from
    proven accesses. Unknown and unsupported cases retain runtime checks;
    pointer behavior, fault ordering and volatile observations remain part of
    the correctness contract.
  • Stack and frame planning: eligible functions use static frames, and
    eligible private functions receive register arguments while preserving the
    public call ABI. --static-stack-proof records an exclusive runtime-entry
    contract for main; the linker validates the bound against the actual
    initial stack and memory placement.
  • Optional short RAM: --short-ram <bytes> with stack proof, or project
    target.gsu.short_ram = true with eligible runtime startup, uses
    $0002..$01FF for static-frame word slots addressed through LMS/SMS.
    Compiler, assembler, linker and runtime handle placement, relocations,
    initialization and overlap validation together. Hosts must reserve this
    window and keep framebuffers clear of it.
  • Optimization and scheduling: bounded inlining, dead private-function
    removal, pointer-load and register-transfer improvements, regional loop
    values, CACHE selection, division-kernel window handling and Os candidate
    exchange improve selected workloads. Peepholes and delay slots retain
    selector, flag, entry-point, relocation and ABI constraints.
  • Revised demos and regressions: gem chess and interactive shapes use
    rewritten renderers and short RAM layouts. The rotating checkerboard uses
    separate edge/fill passes and bounded asynchronous capture. Rotation and
    scaling initialize their status mailbox before multi-frame setup.
    Expanded compiler, object/linker, project and graphics tests cover the new
    behavior, expected failures and byte-exact assembly round-trips.

See the full release notes,
architecture,
optimization contract
and project configuration.

Downloads and completed final-source checks

Four native CI distributions passed their extracted-package smoke checks:

The original native CI archives are retained without repacking. Read each
archive's DEPENDENCIES.txt for its actual architecture and runtime requirements.
Smoke checks do not establish universal portability or the availability of
required runtimes on every end-user machine.

The exact-source ZIP
contains the complete tracked source at the release revision.

The DOS i586 archive
is an experimental cross-build with runtime behavior unverified.

Final-source functional and complete-ROM checks used the verified Linux CI tools:

  • 36/36 functional benchmark cases passed, covering nine workloads at
    O0/O1/O2/Os. Payload byte counts and executed-opcode counts match the
    2026-11-16 reports. This recheck does not relabel those older tool/source
    records; no new nine-workload GSU-cycle timing matrix is claimed.
  • 9/9 complete-ROM configurations passed their builds, assembly
    round-trips and both runtime paths: nine positive and nine deliberate-negative
    ROMs. Rotation, scaling, interactive shapes and gem chess were checked at
    O2/Os; the public triangle was checked at O2.
  • Rotation checked 64 poses plus wrap and 49,152 pixels per pose. Scaling
    checked 64 phases plus wrap, eight colors and 33 visible sizes. Shapes
    checked full OBJ framebuffers and controller behavior; gem chess checked
    ten views, 18 publications and its geometry fixtures. The public triangle
    checked all 49,152 pixels and 1,024 tilemap entries. Captures are 256x224;
    the fixed NTSC screen-buffer contract is 256x239.

The SNES demo package
separates positive ROMs from intentional failure fixtures and includes exact
source, generated inputs, verification logs and indexed file hashes.
BUILD-INFO.json,
the evidence archive
and SHA256SUMS.txt
record package/source identities and verification results. The
reproduction guide
and native packaging procedure
describe the workflows.

Compatibility and remaining limits

Rebuild discc, discas and discld together, then rebuild application objects.
The default object writer remains version 7; static RAM proofs require at
least 8, static stack bounds 9, and short RAM 10. The reader accepts
versions 3-10 with version-specific validation. Older tools cannot consume
the new variants, and legacy readability does not establish ABI compatibility.
See the object format contract.

-O0 remains the default; -O1/-O, -O2 and -Os require explicit selection.
A native CMake Release build does not select an optimization level for DiscoC
input. Native builds use C++23; the experimental DOS cross-build retains C++14.

Keep each demo's manifest, host, display code and verifier together. Gem chess
uses framebuffer $0400, payload $70:6400 and ordinary statics $D000;
interactive shapes reserves the OBJ domain through $83FF, starts its payload
at $70:8400 and also places ordinary statics at $D000. Their RAM hosts
support O2/Os.

  • A linked .bin is a fixed-origin GSU payload. Complete SNES ROMs require
    host loading and bus/PPU setup; position-independent programs are outside
    the current contract.
  • SPC700 remains frontend/capability/verified-IR support without an executable
    backend. General source inline assembly, interbank code calls,
    aggregate-by-value ABI and independently placed RAM code/ROM constants
    remain unsupported.
  • Optimization is bounded and workload-dependent. Large balanced switches
    can exceed a diagnosed local-branch range limit. Minimum code size or
    execution cycles are not guaranteed.
  • Functional opcode counts, GSU cycles and completed-image FPS measure
    different things. Historical before/after tables retain their dated scope.
    Emulator checks establish neither physical-hardware performance nor
    exhaustive fuzzing coverage.

The SNES demos contain no proprietary Nintendo code, commercial game assets
or Nintendo SDK components.

Final CI status

CMake run 44087540231
completed successfully for the exact package source: 9/9 jobs passed.
The native Debug/Release jobs on Ubuntu, Windows and macOS, the MinGW job
and the sanitizer job each passed 387/387 CTest tests. The sanitizer test
step completed in 1,525.32 seconds. The DOS job verifies cross-compilation.
Full logs and per-job summaries, including compiler warnings, are retained
in the evidence archive.

Local final-source static analysis passed for all 40 compiler translation
units with cppcheck 2.19.0 and clang-tidy 21.1.8 using the project's
configured checks. The release manifest identifies the commands, logs,
source and tool hashes.