c64-kb 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2082 -0
- package/LICENSE +29 -0
- package/README.md +559 -0
- package/VERSION +25 -0
- package/dist/cli/setup.js +66 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli-memorize-audit.js +97 -0
- package/dist/cli-memorize-audit.js.map +1 -0
- package/dist/cli.js +335 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.js +83 -0
- package/dist/config.js.map +1 -0
- package/dist/context.js +53 -0
- package/dist/context.js.map +1 -0
- package/dist/domain/budget-notes.js +104 -0
- package/dist/domain/budget-notes.js.map +1 -0
- package/dist/domain/budget.js +417 -0
- package/dist/domain/budget.js.map +1 -0
- package/dist/domain/game-design.js +77 -0
- package/dist/domain/game-design.js.map +1 -0
- package/dist/domain/timing.js +39 -0
- package/dist/domain/timing.js.map +1 -0
- package/dist/graph/apply.js +132 -0
- package/dist/graph/apply.js.map +1 -0
- package/dist/graph/claims.js +231 -0
- package/dist/graph/claims.js.map +1 -0
- package/dist/graph/extract/archetype.js +118 -0
- package/dist/graph/extract/archetype.js.map +1 -0
- package/dist/graph/extract/common.js +69 -0
- package/dist/graph/extract/common.js.map +1 -0
- package/dist/graph/extract/failure.js +37 -0
- package/dist/graph/extract/failure.js.map +1 -0
- package/dist/graph/extract/game-design.js +189 -0
- package/dist/graph/extract/game-design.js.map +1 -0
- package/dist/graph/extract/hardware.js +124 -0
- package/dist/graph/extract/hardware.js.map +1 -0
- package/dist/graph/extract/pitfall.js +62 -0
- package/dist/graph/extract/pitfall.js.map +1 -0
- package/dist/graph/extract/raster-band.js +56 -0
- package/dist/graph/extract/raster-band.js.map +1 -0
- package/dist/graph/extract/recipe.js +71 -0
- package/dist/graph/extract/recipe.js.map +1 -0
- package/dist/graph/extract/technique-entities.js +180 -0
- package/dist/graph/extract/technique-entities.js.map +1 -0
- package/dist/graph/extract/technique.js +179 -0
- package/dist/graph/extract/technique.js.map +1 -0
- package/dist/graph/extract/toolchain.js +67 -0
- package/dist/graph/extract/toolchain.js.map +1 -0
- package/dist/graph/extract/types.js +3 -0
- package/dist/graph/extract/types.js.map +1 -0
- package/dist/graph/extract/vocabulary.js +65 -0
- package/dist/graph/extract/vocabulary.js.map +1 -0
- package/dist/graph/extract.js +43 -0
- package/dist/graph/extract.js.map +1 -0
- package/dist/graph/kernal-clobbers.js +64 -0
- package/dist/graph/kernal-clobbers.js.map +1 -0
- package/dist/graph/machine-variants.js +208 -0
- package/dist/graph/machine-variants.js.map +1 -0
- package/dist/ingest/files.js +99 -0
- package/dist/ingest/files.js.map +1 -0
- package/dist/ingest/passes.js +104 -0
- package/dist/ingest/passes.js.map +1 -0
- package/dist/ingest/points.js +50 -0
- package/dist/ingest/points.js.map +1 -0
- package/dist/ingest/report.js +140 -0
- package/dist/ingest/report.js.map +1 -0
- package/dist/ingest/tally.js +81 -0
- package/dist/ingest/tally.js.map +1 -0
- package/dist/ingest/verified-on.js +43 -0
- package/dist/ingest/verified-on.js.map +1 -0
- package/dist/ingest.js +135 -0
- package/dist/ingest.js.map +1 -0
- package/dist/schemas/cost-basis.js +5 -0
- package/dist/schemas/cost-basis.js.map +1 -0
- package/dist/schemas/machine-variant.js +25 -0
- package/dist/schemas/machine-variant.js.map +1 -0
- package/dist/schemas/plan-budget.js +121 -0
- package/dist/schemas/plan-budget.js.map +1 -0
- package/dist/schemas/tool-outputs.js +526 -0
- package/dist/schemas/tool-outputs.js.map +1 -0
- package/dist/server/define-tool.js +52 -0
- package/dist/server/define-tool.js.map +1 -0
- package/dist/server/defined-only.js +9 -0
- package/dist/server/defined-only.js.map +1 -0
- package/dist/server/tools-briefings.js +70 -0
- package/dist/server/tools-briefings.js.map +1 -0
- package/dist/server/tools-lookup.js +180 -0
- package/dist/server/tools-lookup.js.map +1 -0
- package/dist/server/tools-maintenance.js +116 -0
- package/dist/server/tools-maintenance.js.map +1 -0
- package/dist/server/tools-pitfalls.js +89 -0
- package/dist/server/tools-pitfalls.js.map +1 -0
- package/dist/server/tools-recipes.js +296 -0
- package/dist/server/tools-recipes.js.map +1 -0
- package/dist/server/tools-runtime.js +48 -0
- package/dist/server/tools-runtime.js.map +1 -0
- package/dist/server/tools.js +43 -0
- package/dist/server/tools.js.map +1 -0
- package/dist/server.js +95 -0
- package/dist/server.js.map +1 -0
- package/dist/services/analytics/schema.js +78 -0
- package/dist/services/analytics/schema.js.map +1 -0
- package/dist/services/analytics/statements.js +99 -0
- package/dist/services/analytics/statements.js.map +1 -0
- package/dist/services/analytics.js +195 -0
- package/dist/services/analytics.js.map +1 -0
- package/dist/services/bm25.js +158 -0
- package/dist/services/bm25.js.map +1 -0
- package/dist/services/chunker.js +81 -0
- package/dist/services/chunker.js.map +1 -0
- package/dist/services/embeddings.js +58 -0
- package/dist/services/embeddings.js.map +1 -0
- package/dist/services/falkor/base.js +85 -0
- package/dist/services/falkor/base.js.map +1 -0
- package/dist/services/falkor/links.js +361 -0
- package/dist/services/falkor/links.js.map +1 -0
- package/dist/services/falkor/nodes.js +183 -0
- package/dist/services/falkor/nodes.js.map +1 -0
- package/dist/services/falkor/params.js +45 -0
- package/dist/services/falkor/params.js.map +1 -0
- package/dist/services/falkor/schema.js +77 -0
- package/dist/services/falkor/schema.js.map +1 -0
- package/dist/services/falkor.js +100 -0
- package/dist/services/falkor.js.map +1 -0
- package/dist/services/qdrant.js +238 -0
- package/dist/services/qdrant.js.map +1 -0
- package/dist/services/versions.js +73 -0
- package/dist/services/versions.js.map +1 -0
- package/dist/services/vice-bin.js +51 -0
- package/dist/services/vice-bin.js.map +1 -0
- package/dist/tools/briefings/archetype.js +174 -0
- package/dist/tools/briefings/archetype.js.map +1 -0
- package/dist/tools/briefings/budget.js +177 -0
- package/dist/tools/briefings/budget.js.map +1 -0
- package/dist/tools/briefings/build-order.js +135 -0
- package/dist/tools/briefings/build-order.js.map +1 -0
- package/dist/tools/briefings/build.js +185 -0
- package/dist/tools/briefings/build.js.map +1 -0
- package/dist/tools/briefings/discovery.js +290 -0
- package/dist/tools/briefings/discovery.js.map +1 -0
- package/dist/tools/briefings/plan-pitfalls.js +69 -0
- package/dist/tools/briefings/plan-pitfalls.js.map +1 -0
- package/dist/tools/briefings/render.js +151 -0
- package/dist/tools/briefings/render.js.map +1 -0
- package/dist/tools/briefings/rows.js +41 -0
- package/dist/tools/briefings/rows.js.map +1 -0
- package/dist/tools/briefings/toolchain.js +63 -0
- package/dist/tools/briefings/toolchain.js.map +1 -0
- package/dist/tools/briefings/why-proposed.js +69 -0
- package/dist/tools/briefings/why-proposed.js.map +1 -0
- package/dist/tools/briefings.js +44 -0
- package/dist/tools/briefings.js.map +1 -0
- package/dist/tools/feedback.js +97 -0
- package/dist/tools/feedback.js.map +1 -0
- package/dist/tools/hydrate.js +75 -0
- package/dist/tools/hydrate.js.map +1 -0
- package/dist/tools/intelligence.js +67 -0
- package/dist/tools/intelligence.js.map +1 -0
- package/dist/tools/lint/asm-decimal.js +86 -0
- package/dist/tools/lint/asm-decimal.js.map +1 -0
- package/dist/tools/lint/asm-rules.js +221 -0
- package/dist/tools/lint/asm-rules.js.map +1 -0
- package/dist/tools/lint/asm-shared.js +3 -0
- package/dist/tools/lint/asm-shared.js.map +1 -0
- package/dist/tools/lint/c-rules.js +215 -0
- package/dist/tools/lint/c-rules.js.map +1 -0
- package/dist/tools/lint/text.js +122 -0
- package/dist/tools/lint/text.js.map +1 -0
- package/dist/tools/lint/types.js +40 -0
- package/dist/tools/lint/types.js.map +1 -0
- package/dist/tools/lint.js +76 -0
- package/dist/tools/lint.js.map +1 -0
- package/dist/tools/memorization-mcp.js +111 -0
- package/dist/tools/memorization-mcp.js.map +1 -0
- package/dist/tools/pitfalls/bm25.js +53 -0
- package/dist/tools/pitfalls/bm25.js.map +1 -0
- package/dist/tools/pitfalls/format.js +58 -0
- package/dist/tools/pitfalls/format.js.map +1 -0
- package/dist/tools/pitfalls/graph.js +124 -0
- package/dist/tools/pitfalls/graph.js.map +1 -0
- package/dist/tools/pitfalls.js +134 -0
- package/dist/tools/pitfalls.js.map +1 -0
- package/dist/tools/prompts.js +81 -0
- package/dist/tools/prompts.js.map +1 -0
- package/dist/tools/query/compatibility/closure.js +62 -0
- package/dist/tools/query/compatibility/closure.js.map +1 -0
- package/dist/tools/query/compatibility/facts.js +28 -0
- package/dist/tools/query/compatibility/facts.js.map +1 -0
- package/dist/tools/query/compatibility/fetch.js +164 -0
- package/dist/tools/query/compatibility/fetch.js.map +1 -0
- package/dist/tools/query/compatibility/hard-rules.js +159 -0
- package/dist/tools/query/compatibility/hard-rules.js.map +1 -0
- package/dist/tools/query/compatibility/index.js +27 -0
- package/dist/tools/query/compatibility/index.js.map +1 -0
- package/dist/tools/query/compatibility/kernal-zp-rule.js +90 -0
- package/dist/tools/query/compatibility/kernal-zp-rule.js.map +1 -0
- package/dist/tools/query/compatibility/render.js +106 -0
- package/dist/tools/query/compatibility/render.js.map +1 -0
- package/dist/tools/query/compatibility/rules.js +337 -0
- package/dist/tools/query/compatibility/rules.js.map +1 -0
- package/dist/tools/query/compatibility/unit-rules.js +253 -0
- package/dist/tools/query/compatibility/unit-rules.js.map +1 -0
- package/dist/tools/query/game-design.js +83 -0
- package/dist/tools/query/game-design.js.map +1 -0
- package/dist/tools/query/lookups.js +220 -0
- package/dist/tools/query/lookups.js.map +1 -0
- package/dist/tools/query/plan-budget.js +266 -0
- package/dist/tools/query/plan-budget.js.map +1 -0
- package/dist/tools/query/recipes.js +214 -0
- package/dist/tools/query/recipes.js.map +1 -0
- package/dist/tools/query/retrieval.js +128 -0
- package/dist/tools/query/retrieval.js.map +1 -0
- package/dist/tools/query/shared.js +121 -0
- package/dist/tools/query/shared.js.map +1 -0
- package/dist/tools/query/techniques.js +331 -0
- package/dist/tools/query/techniques.js.map +1 -0
- package/dist/tools/query/timing.js +106 -0
- package/dist/tools/query/timing.js.map +1 -0
- package/dist/tools/query/types.js +11 -0
- package/dist/tools/query/types.js.map +1 -0
- package/dist/tools/query.js +21 -0
- package/dist/tools/query.js.map +1 -0
- package/dist/tools/resources.js +186 -0
- package/dist/tools/resources.js.map +1 -0
- package/dist/tools/run-game.js +249 -0
- package/dist/tools/run-game.js.map +1 -0
- package/dist/tools/selfimprovement.js +367 -0
- package/dist/tools/selfimprovement.js.map +1 -0
- package/docker-compose.yml +35 -0
- package/docs/ARCHITECTURE.md +164 -0
- package/docs/CONVENTIONS-archetypes.md +158 -0
- package/docs/CONVENTIONS-failures.md +46 -0
- package/docs/CONVENTIONS-game-designs.md +75 -0
- package/docs/CONVENTIONS-hardware-reference.md +184 -0
- package/docs/CONVENTIONS-pitfalls.md +91 -0
- package/docs/CONVENTIONS-recipes.md +106 -0
- package/docs/CONVENTIONS-techniques.md +309 -0
- package/docs/CONVENTIONS-toolchain-reference.md +89 -0
- package/docs/ONTOLOGY.md +655 -0
- package/docs/art/art-production-reference.md +157 -0
- package/docs/art/asset-pipelines.md +586 -0
- package/docs/c64-failure-patterns.md +693 -0
- package/docs/demo-design/demo-composition.md +349 -0
- package/docs/demo-design/demo-design-philosophy.md +320 -0
- package/docs/demo-design/intro-cracktro-patterns.md +435 -0
- package/docs/figures/ctm-spd-embed-probe.png +0 -0
- package/docs/figures/dot-flag-mid-5000000.png +0 -0
- package/docs/figures/dot-flag-no-erase-12000000.png +0 -0
- package/docs/figures/edges.json +1 -0
- package/docs/figures/fig6-architecture.png +0 -0
- package/docs/figures/fig7-ontology.png +0 -0
- package/docs/figures/screen-dissolve-mid-frame25.png +0 -0
- package/docs/figures/screen-dissolve-wipe-frame25.png +0 -0
- package/docs/figures/spindle-two-parts-part1.png +0 -0
- package/docs/figures/spindle-two-parts-part2.png +0 -0
- package/docs/figures/starters/action-puzzle.png +0 -0
- package/docs/figures/starters/adventure.png +0 -0
- package/docs/figures/starters/beat-em-up.png +0 -0
- package/docs/figures/starters/demo.png +0 -0
- package/docs/figures/starters/platformer.png +0 -0
- package/docs/figures/starters/shmup-vertical.png +0 -0
- package/docs/figures/tape-kernal-master-ntsc.png +0 -0
- package/docs/figures/tape-kernal-master-pal.png +0 -0
- package/docs/figures/tape-turbo-loader-ntsc.png +0 -0
- package/docs/figures/tape-turbo-loader-pal.png +0 -0
- package/docs/figures/tape-turbo-master-ntsc.png +0 -0
- package/docs/figures/tape-turbo-master-pal.png +0 -0
- package/docs/figures/tech-tech-pad2-12000000.png +0 -0
- package/docs/figures/tech-tech-pad4-12000000.png +0 -0
- package/docs/figures/tech-tech-seven-12000000.png +0 -0
- package/docs/figures/twister-mid-5000000.png +0 -0
- package/docs/figures/twister-straight-12000000.png +0 -0
- package/docs/figures/vector-balls-nosort-ntsc.png +0 -0
- package/docs/figures/vector-balls-nosort.png +0 -0
- package/docs/formats/c64-file-formats.md +1212 -0
- package/docs/formats/iec-disk-reference.md +754 -0
- package/docs/game-design/c64-game-archetypes.md +273 -0
- package/docs/game-design/designs/falling-blocks.md +54 -0
- package/docs/game-design/designs/platformer-scaffold.md +48 -0
- package/docs/game-design/designs/simple-shmup.md +27 -0
- package/docs/game-design/enemy-behaviour-and-difficulty.md +349 -0
- package/docs/game-design/game-design-patterns.md +1189 -0
- package/docs/game-design/game-structure.md +354 -0
- package/docs/game-design/production-planning.md +349 -0
- package/docs/game-design/reference-game-sources.md +90 -0
- package/docs/hardware/6502-illegal-opcodes.md +1353 -0
- package/docs/hardware/6510-cpu-reference.md +2112 -0
- package/docs/hardware/c64-memory-map.md +3184 -0
- package/docs/hardware/c64-registers-reference.md +996 -0
- package/docs/hardware/cia-reference.md +1281 -0
- package/docs/hardware/kernal-routines-reference.md +1836 -0
- package/docs/hardware/pal-ntsc-reference.md +813 -0
- package/docs/hardware/sid-reference.md +1137 -0
- package/docs/hardware/vic-ii-reference.md +1714 -0
- package/docs/music/music-production-reference.md +403 -0
- package/docs/pitfalls/banking.md +1067 -0
- package/docs/pitfalls/cia.md +1147 -0
- package/docs/pitfalls/cpu.md +874 -0
- package/docs/pitfalls/input.md +282 -0
- package/docs/pitfalls/kernal-and-io.md +1615 -0
- package/docs/pitfalls/loader.md +1191 -0
- package/docs/pitfalls/logic.md +94 -0
- package/docs/pitfalls/maths.md +187 -0
- package/docs/pitfalls/raster-and-badline.md +721 -0
- package/docs/pitfalls/region-timing.md +660 -0
- package/docs/pitfalls/scroll.md +207 -0
- package/docs/pitfalls/sid.md +738 -0
- package/docs/pitfalls/sprite.md +979 -0
- package/docs/pitfalls/text-mode-render.md +1172 -0
- package/docs/recipes/cc65/cartridge-8k.md +398 -0
- package/docs/recipes/cc65/hello-world-conio.md +76 -0
- package/docs/recipes/cc65/memory-layout.md +312 -0
- package/docs/recipes/cc65/screenshots/README.md +14 -0
- package/docs/recipes/cc65/screenshots/cartridge-8k-ntsc.png +0 -0
- package/docs/recipes/cc65/screenshots/cartridge-8k.png +0 -0
- package/docs/recipes/cc65/screenshots/hello-world-conio.png +0 -0
- package/docs/recipes/cc65/screenshots/memory-layout-ntsc.png +0 -0
- package/docs/recipes/cc65/screenshots/memory-layout.png +0 -0
- package/docs/recipes/kickassembler/basic-float-calls.md +578 -0
- package/docs/recipes/kickassembler/basic-wedge.md +398 -0
- package/docs/recipes/kickassembler/big-font-scroller.md +620 -0
- package/docs/recipes/kickassembler/charset-copy-rom-to-ram.md +623 -0
- package/docs/recipes/kickassembler/cia-revision-detect.md +366 -0
- package/docs/recipes/kickassembler/colour-cycling.md +343 -0
- package/docs/recipes/kickassembler/colour-fade.md +303 -0
- package/docs/recipes/kickassembler/compare-16bit-signed.md +1007 -0
- package/docs/recipes/kickassembler/cracktro-template.md +526 -0
- package/docs/recipes/kickassembler/crt-banked.md +276 -0
- package/docs/recipes/kickassembler/dos-error-codes.md +466 -0
- package/docs/recipes/kickassembler/dot-flag.md +576 -0
- package/docs/recipes/kickassembler/drive-job-queue.md +667 -0
- package/docs/recipes/kickassembler/drive-via-probe.md +690 -0
- package/docs/recipes/kickassembler/dycp-scroller.md +568 -0
- package/docs/recipes/kickassembler/dypp-sprite-scroller.md +681 -0
- package/docs/recipes/kickassembler/dysp.md +670 -0
- package/docs/recipes/kickassembler/easyflash-save.md +800 -0
- package/docs/recipes/kickassembler/eight-way-scroll.md +1484 -0
- package/docs/recipes/kickassembler/file-io-roundtrip.md +546 -0
- package/docs/recipes/kickassembler/fire-effect.md +420 -0
- package/docs/recipes/kickassembler/fld.md +414 -0
- package/docs/recipes/kickassembler/fli-image.md +336 -0
- package/docs/recipes/kickassembler/four-player-read.md +672 -0
- package/docs/recipes/kickassembler/headless-verify.md +228 -0
- package/docs/recipes/kickassembler/hello-world.md +98 -0
- package/docs/recipes/kickassembler/high-score-insert.md +660 -0
- package/docs/recipes/kickassembler/hires-plot-line.md +723 -0
- package/docs/recipes/kickassembler/irq-chain.md +316 -0
- package/docs/recipes/kickassembler/irq-owns-port.md +668 -0
- package/docs/recipes/kickassembler/isometric-room.md +1145 -0
- package/docs/recipes/kickassembler/light-pen-read.md +926 -0
- package/docs/recipes/kickassembler/logic-rate-decoupling.md +670 -0
- package/docs/recipes/kickassembler/mci-interlace.md +543 -0
- package/docs/recipes/kickassembler/memory-layout.md +277 -0
- package/docs/recipes/kickassembler/mouse-1351-read.md +801 -0
- package/docs/recipes/kickassembler/nmi-timer-tick.md +562 -0
- package/docs/recipes/kickassembler/own-keyscan.md +881 -0
- package/docs/recipes/kickassembler/paddle-read.md +751 -0
- package/docs/recipes/kickassembler/palette-cells.md +219 -0
- package/docs/recipes/kickassembler/pseudo-3d-road.md +930 -0
- package/docs/recipes/kickassembler/pwm-digi.md +463 -0
- package/docs/recipes/kickassembler/raster-bars.md +264 -0
- package/docs/recipes/kickassembler/reu-dma.md +1019 -0
- package/docs/recipes/kickassembler/runtime-relocation.md +743 -0
- package/docs/recipes/kickassembler/screen-dissolve.md +545 -0
- package/docs/recipes/kickassembler/screen-wipe.md +408 -0
- package/docs/recipes/kickassembler/screenshots/README.md +72 -0
- package/docs/recipes/kickassembler/screenshots/basic-float-calls-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/basic-float-calls.png +0 -0
- package/docs/recipes/kickassembler/screenshots/basic-wedge-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/basic-wedge.png +0 -0
- package/docs/recipes/kickassembler/screenshots/big-font-scroller-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/big-font-scroller.png +0 -0
- package/docs/recipes/kickassembler/screenshots/charset-copy-rom-to-ram-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/charset-copy-rom-to-ram.png +0 -0
- package/docs/recipes/kickassembler/screenshots/cia-revision-detect-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/cia-revision-detect.png +0 -0
- package/docs/recipes/kickassembler/screenshots/colour-cycling-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/colour-cycling.png +0 -0
- package/docs/recipes/kickassembler/screenshots/colour-fade-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/colour-fade.png +0 -0
- package/docs/recipes/kickassembler/screenshots/compare-16bit-signed-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/compare-16bit-signed.png +0 -0
- package/docs/recipes/kickassembler/screenshots/cracktro-template.png +0 -0
- package/docs/recipes/kickassembler/screenshots/crt-banked-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/crt-banked.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dos-error-codes-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dos-error-codes.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dot-flag-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dot-flag.png +0 -0
- package/docs/recipes/kickassembler/screenshots/drive-job-queue-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/drive-job-queue.png +0 -0
- package/docs/recipes/kickassembler/screenshots/drive-via-probe-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/drive-via-probe.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dycp-scroller-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dycp-scroller.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dypp-sprite-scroller-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dypp-sprite-scroller.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dysp-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/dysp.png +0 -0
- package/docs/recipes/kickassembler/screenshots/easyflash-save-ntsc-run2.png +0 -0
- package/docs/recipes/kickassembler/screenshots/easyflash-save-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/easyflash-save-run2.png +0 -0
- package/docs/recipes/kickassembler/screenshots/easyflash-save.png +0 -0
- package/docs/recipes/kickassembler/screenshots/eight-way-scroll-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/eight-way-scroll.png +0 -0
- package/docs/recipes/kickassembler/screenshots/file-io-roundtrip-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/file-io-roundtrip.png +0 -0
- package/docs/recipes/kickassembler/screenshots/fire-effect-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/fire-effect.png +0 -0
- package/docs/recipes/kickassembler/screenshots/fld-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/fld.png +0 -0
- package/docs/recipes/kickassembler/screenshots/fli-image.png +0 -0
- package/docs/recipes/kickassembler/screenshots/four-player-read-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/four-player-read.png +0 -0
- package/docs/recipes/kickassembler/screenshots/headless-verify-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/headless-verify.png +0 -0
- package/docs/recipes/kickassembler/screenshots/hello-world.png +0 -0
- package/docs/recipes/kickassembler/screenshots/high-score-insert-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/high-score-insert.png +0 -0
- package/docs/recipes/kickassembler/screenshots/hires-plot-line-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/hires-plot-line.png +0 -0
- package/docs/recipes/kickassembler/screenshots/irq-chain-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/irq-chain.png +0 -0
- package/docs/recipes/kickassembler/screenshots/irq-owns-port-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/irq-owns-port.png +0 -0
- package/docs/recipes/kickassembler/screenshots/isometric-room-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/isometric-room.png +0 -0
- package/docs/recipes/kickassembler/screenshots/light-pen-read-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/light-pen-read.png +0 -0
- package/docs/recipes/kickassembler/screenshots/logic-rate-decoupling-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/logic-rate-decoupling.png +0 -0
- package/docs/recipes/kickassembler/screenshots/mci-interlace-average.png +0 -0
- package/docs/recipes/kickassembler/screenshots/mci-interlace-frame-b.png +0 -0
- package/docs/recipes/kickassembler/screenshots/mci-interlace-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/mci-interlace.png +0 -0
- package/docs/recipes/kickassembler/screenshots/memory-layout-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/memory-layout.png +0 -0
- package/docs/recipes/kickassembler/screenshots/mouse-1351-read-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/mouse-1351-read.png +0 -0
- package/docs/recipes/kickassembler/screenshots/nmi-timer-tick-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/nmi-timer-tick.png +0 -0
- package/docs/recipes/kickassembler/screenshots/own-keyscan-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/own-keyscan.png +0 -0
- package/docs/recipes/kickassembler/screenshots/paddle-read-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/paddle-read.png +0 -0
- package/docs/recipes/kickassembler/screenshots/palette-cells-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/palette-cells.png +0 -0
- package/docs/recipes/kickassembler/screenshots/pseudo-3d-road-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/pseudo-3d-road.png +0 -0
- package/docs/recipes/kickassembler/screenshots/pwm-digi-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/pwm-digi.png +0 -0
- package/docs/recipes/kickassembler/screenshots/raster-bars.png +0 -0
- package/docs/recipes/kickassembler/screenshots/reu-dma-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/reu-dma.png +0 -0
- package/docs/recipes/kickassembler/screenshots/runtime-relocation-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/runtime-relocation.png +0 -0
- package/docs/recipes/kickassembler/screenshots/screen-dissolve-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/screen-dissolve.png +0 -0
- package/docs/recipes/kickassembler/screenshots/screen-wipe-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/screen-wipe.png +0 -0
- package/docs/recipes/kickassembler/screenshots/scroll-panel-split-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/scroll-panel-split.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sfx-in-player-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sfx-in-player.png +0 -0
- package/docs/recipes/kickassembler/screenshots/shadebobs-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/shadebobs.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sideborder-open.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sine-scroller.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sine-table-runtime-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sine-table-runtime.png +0 -0
- package/docs/recipes/kickassembler/screenshots/software-sprite-preshifted-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/software-sprite-preshifted.png +0 -0
- package/docs/recipes/kickassembler/screenshots/speedcode-generator-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/speedcode-generator.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-border-scroller-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-border-scroller.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-cache-flip-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-cache-flip.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-multiplex-24.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-multiplex-game-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-multiplex-game.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-priority-classes-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-priority-classes.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-sine-chain-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-sine-chain.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-stretcher-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprite-stretcher.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprites-only-screen-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sprites-only-screen.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sqrt-atan2-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/sqrt-atan2.png +0 -0
- package/docs/recipes/kickassembler/screenshots/stable-raster-irq-control.png +0 -0
- package/docs/recipes/kickassembler/screenshots/stable-raster-irq.png +0 -0
- package/docs/recipes/kickassembler/screenshots/tech-tech-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/tech-tech.png +0 -0
- package/docs/recipes/kickassembler/screenshots/tod-alarm-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/tod-alarm.png +0 -0
- package/docs/recipes/kickassembler/screenshots/topbottom-border-open.png +0 -0
- package/docs/recipes/kickassembler/screenshots/twister-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/twister.png +0 -0
- package/docs/recipes/kickassembler/screenshots/unit-test-driver-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/unit-test-driver.png +0 -0
- package/docs/recipes/kickassembler/screenshots/vector-balls-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/vector-balls.png +0 -0
- package/docs/recipes/kickassembler/screenshots/wireframe-ships-ntsc.png +0 -0
- package/docs/recipes/kickassembler/screenshots/wireframe-ships.png +0 -0
- package/docs/recipes/kickassembler/scroll-panel-split.md +381 -0
- package/docs/recipes/kickassembler/sfx-in-player.md +907 -0
- package/docs/recipes/kickassembler/shadebobs.md +522 -0
- package/docs/recipes/kickassembler/sideborder-open.md +338 -0
- package/docs/recipes/kickassembler/sine-scroller.md +321 -0
- package/docs/recipes/kickassembler/sine-table-runtime.md +815 -0
- package/docs/recipes/kickassembler/software-sprite-preshifted.md +725 -0
- package/docs/recipes/kickassembler/speedcode-generator.md +606 -0
- package/docs/recipes/kickassembler/sprite-border-scroller.md +696 -0
- package/docs/recipes/kickassembler/sprite-cache-flip.md +1071 -0
- package/docs/recipes/kickassembler/sprite-multiplex-24.md +326 -0
- package/docs/recipes/kickassembler/sprite-multiplex-game.md +986 -0
- package/docs/recipes/kickassembler/sprite-priority-classes.md +463 -0
- package/docs/recipes/kickassembler/sprite-sine-chain.md +338 -0
- package/docs/recipes/kickassembler/sprite-stretcher.md +501 -0
- package/docs/recipes/kickassembler/sprites-only-screen.md +550 -0
- package/docs/recipes/kickassembler/sqrt-atan2.md +1014 -0
- package/docs/recipes/kickassembler/stable-raster-irq.md +360 -0
- package/docs/recipes/kickassembler/tape-turbo-loader.md +875 -0
- package/docs/recipes/kickassembler/tech-tech.md +679 -0
- package/docs/recipes/kickassembler/tod-alarm.md +754 -0
- package/docs/recipes/kickassembler/topbottom-border-open.md +407 -0
- package/docs/recipes/kickassembler/twister.md +518 -0
- package/docs/recipes/kickassembler/unit-test-driver.md +314 -0
- package/docs/recipes/kickassembler/vector-balls.md +545 -0
- package/docs/recipes/kickassembler/wireframe-ships.md +2324 -0
- package/docs/recipes/oscar64/actor-activation-window.md +807 -0
- package/docs/recipes/oscar64/adventure-engine.md +1094 -0
- package/docs/recipes/oscar64/attract-replay.md +465 -0
- package/docs/recipes/oscar64/beat-em-up-lanes.md +563 -0
- package/docs/recipes/oscar64/bfs-distance-map.md +723 -0
- package/docs/recipes/oscar64/bitmap-koala-viewer.md +355 -0
- package/docs/recipes/oscar64/car-contact.md +950 -0
- package/docs/recipes/oscar64/cave-scan.md +609 -0
- package/docs/recipes/oscar64/char-bullets.md +477 -0
- package/docs/recipes/oscar64/charset-animation.md +383 -0
- package/docs/recipes/oscar64/charset-parallax.md +401 -0
- package/docs/recipes/oscar64/destructible-terrain.md +1099 -0
- package/docs/recipes/oscar64/difficulty-tables.md +654 -0
- package/docs/recipes/oscar64/dig-and-guards.md +975 -0
- package/docs/recipes/oscar64/directory-reader.md +535 -0
- package/docs/recipes/oscar64/divide-check.md +581 -0
- package/docs/recipes/oscar64/double-buffer-nomirror.md +205 -0
- package/docs/recipes/oscar64/double-buffer.md +255 -0
- package/docs/recipes/oscar64/falling-blocks.md +874 -0
- package/docs/recipes/oscar64/fixed-point-jump-velocity.md +289 -0
- package/docs/recipes/oscar64/fixed-point-jump.md +210 -0
- package/docs/recipes/oscar64/flip-screen-rooms.md +793 -0
- package/docs/recipes/oscar64/frame-sync-loop-overrun.md +214 -0
- package/docs/recipes/oscar64/frame-sync-loop.md +254 -0
- package/docs/recipes/oscar64/game-tree-search.md +743 -0
- package/docs/recipes/oscar64/ghost-targeting.md +867 -0
- package/docs/recipes/oscar64/headless-verify.md +345 -0
- package/docs/recipes/oscar64/hello-world.md +83 -0
- package/docs/recipes/oscar64/high-score-persist.md +772 -0
- package/docs/recipes/oscar64/iffl-kernal-skip.md +421 -0
- package/docs/recipes/oscar64/joystick-input.md +358 -0
- package/docs/recipes/oscar64/lane-pursuit.md +1028 -0
- package/docs/recipes/oscar64/level-rle-decoder.md +620 -0
- package/docs/recipes/oscar64/lfsr-random-seed2.md +338 -0
- package/docs/recipes/oscar64/lfsr-random.md +403 -0
- package/docs/recipes/oscar64/load-asset-runtime.md +492 -0
- package/docs/recipes/oscar64/memory-layout.md +232 -0
- package/docs/recipes/oscar64/mixed-fighters.md +781 -0
- package/docs/recipes/oscar64/multi-sprite-object.md +533 -0
- package/docs/recipes/oscar64/nav-area-pathfinding.md +881 -0
- package/docs/recipes/oscar64/object-pool.md +572 -0
- package/docs/recipes/oscar64/pal-ntsc-detect.md +257 -0
- package/docs/recipes/oscar64/password-state.md +532 -0
- package/docs/recipes/oscar64/per-frame-hitbox.md +651 -0
- package/docs/recipes/oscar64/petscii-screen-codes.md +428 -0
- package/docs/recipes/oscar64/platformer-scaffold.md +1467 -0
- package/docs/recipes/oscar64/print-number.md +367 -0
- package/docs/recipes/oscar64/raster-bars.md +239 -0
- package/docs/recipes/oscar64/raster-profile-bars.md +404 -0
- package/docs/recipes/oscar64/rel-side-sectors.md +391 -0
- package/docs/recipes/oscar64/relative-file-records.md +378 -0
- package/docs/recipes/oscar64/save-load-seq-file.md +365 -0
- package/docs/recipes/oscar64/screenshots/README.md +99 -0
- package/docs/recipes/oscar64/screenshots/actor-activation-window-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/actor-activation-window.png +0 -0
- package/docs/recipes/oscar64/screenshots/adventure-engine-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/adventure-engine.png +0 -0
- package/docs/recipes/oscar64/screenshots/attract-replay-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/attract-replay.png +0 -0
- package/docs/recipes/oscar64/screenshots/beat-em-up-lanes-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/beat-em-up-lanes.png +0 -0
- package/docs/recipes/oscar64/screenshots/bfs-distance-map-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/bfs-distance-map.png +0 -0
- package/docs/recipes/oscar64/screenshots/bitmap-koala-viewer.png +0 -0
- package/docs/recipes/oscar64/screenshots/car-contact-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/car-contact.png +0 -0
- package/docs/recipes/oscar64/screenshots/cave-scan-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/cave-scan.png +0 -0
- package/docs/recipes/oscar64/screenshots/char-bullets-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/char-bullets.png +0 -0
- package/docs/recipes/oscar64/screenshots/charset-animation-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/charset-animation.png +0 -0
- package/docs/recipes/oscar64/screenshots/charset-parallax-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/charset-parallax.png +0 -0
- package/docs/recipes/oscar64/screenshots/destructible-terrain-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/destructible-terrain.png +0 -0
- package/docs/recipes/oscar64/screenshots/difficulty-tables-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/difficulty-tables.png +0 -0
- package/docs/recipes/oscar64/screenshots/dig-and-guards-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/dig-and-guards.png +0 -0
- package/docs/recipes/oscar64/screenshots/directory-reader-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/directory-reader.png +0 -0
- package/docs/recipes/oscar64/screenshots/divide-check-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/divide-check.png +0 -0
- package/docs/recipes/oscar64/screenshots/double-buffer-nomirror.png +0 -0
- package/docs/recipes/oscar64/screenshots/double-buffer-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/double-buffer.png +0 -0
- package/docs/recipes/oscar64/screenshots/falling-blocks-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/falling-blocks.png +0 -0
- package/docs/recipes/oscar64/screenshots/fixed-point-jump-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/fixed-point-jump-velocity-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/fixed-point-jump-velocity.png +0 -0
- package/docs/recipes/oscar64/screenshots/fixed-point-jump.png +0 -0
- package/docs/recipes/oscar64/screenshots/flip-screen-rooms-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/flip-screen-rooms.png +0 -0
- package/docs/recipes/oscar64/screenshots/frame-sync-loop-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/frame-sync-loop-overrun.png +0 -0
- package/docs/recipes/oscar64/screenshots/frame-sync-loop.png +0 -0
- package/docs/recipes/oscar64/screenshots/game-tree-search-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/game-tree-search.png +0 -0
- package/docs/recipes/oscar64/screenshots/ghost-targeting-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/ghost-targeting.png +0 -0
- package/docs/recipes/oscar64/screenshots/headless-verify-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/headless-verify.png +0 -0
- package/docs/recipes/oscar64/screenshots/hello-world.png +0 -0
- package/docs/recipes/oscar64/screenshots/high-score-persist-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/high-score-persist.png +0 -0
- package/docs/recipes/oscar64/screenshots/iffl-kernal-skip-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/iffl-kernal-skip.png +0 -0
- package/docs/recipes/oscar64/screenshots/joystick-input-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/joystick-input.png +0 -0
- package/docs/recipes/oscar64/screenshots/lane-pursuit-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/lane-pursuit.png +0 -0
- package/docs/recipes/oscar64/screenshots/level-rle-decoder-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/level-rle-decoder.png +0 -0
- package/docs/recipes/oscar64/screenshots/lfsr-random-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/lfsr-random-seed2.png +0 -0
- package/docs/recipes/oscar64/screenshots/lfsr-random.png +0 -0
- package/docs/recipes/oscar64/screenshots/load-asset-runtime-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/load-asset-runtime.png +0 -0
- package/docs/recipes/oscar64/screenshots/memory-layout-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/memory-layout.png +0 -0
- package/docs/recipes/oscar64/screenshots/mixed-fighters-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/mixed-fighters.png +0 -0
- package/docs/recipes/oscar64/screenshots/multi-sprite-object-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/multi-sprite-object.png +0 -0
- package/docs/recipes/oscar64/screenshots/nav-area-pathfinding-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/nav-area-pathfinding.png +0 -0
- package/docs/recipes/oscar64/screenshots/object-pool-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/object-pool.png +0 -0
- package/docs/recipes/oscar64/screenshots/pal-ntsc-detect-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/pal-ntsc-detect-oldntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/pal-ntsc-detect-pal.png +0 -0
- package/docs/recipes/oscar64/screenshots/password-state-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/password-state.png +0 -0
- package/docs/recipes/oscar64/screenshots/per-frame-hitbox-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/per-frame-hitbox.png +0 -0
- package/docs/recipes/oscar64/screenshots/petscii-screen-codes-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/petscii-screen-codes.png +0 -0
- package/docs/recipes/oscar64/screenshots/platformer-scaffold-d64-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/platformer-scaffold-d64.png +0 -0
- package/docs/recipes/oscar64/screenshots/platformer-scaffold-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/platformer-scaffold.png +0 -0
- package/docs/recipes/oscar64/screenshots/print-number-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/print-number.png +0 -0
- package/docs/recipes/oscar64/screenshots/raster-bars.png +0 -0
- package/docs/recipes/oscar64/screenshots/raster-profile-bars-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/raster-profile-bars.png +0 -0
- package/docs/recipes/oscar64/screenshots/rel-side-sectors-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/rel-side-sectors.png +0 -0
- package/docs/recipes/oscar64/screenshots/relative-file-records-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/relative-file-records.png +0 -0
- package/docs/recipes/oscar64/screenshots/save-load-seq-file-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/save-load-seq-file.png +0 -0
- package/docs/recipes/oscar64/screenshots/seeded-level-fill-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/seeded-level-fill.png +0 -0
- package/docs/recipes/oscar64/screenshots/sfx-engine-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/sfx-engine.png +0 -0
- package/docs/recipes/oscar64/screenshots/sid-music-player.png +0 -0
- package/docs/recipes/oscar64/screenshots/simple-shmup.png +0 -0
- package/docs/recipes/oscar64/screenshots/slope-collision-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/slope-collision.png +0 -0
- package/docs/recipes/oscar64/screenshots/soft-scroll-h.png +0 -0
- package/docs/recipes/oscar64/screenshots/sprite-animation-table-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/sprite-animation-table.png +0 -0
- package/docs/recipes/oscar64/screenshots/sprite-multiplex-8.png +0 -0
- package/docs/recipes/oscar64/screenshots/stable-raster-irq.png +0 -0
- package/docs/recipes/oscar64/screenshots/text-input-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/text-input.png +0 -0
- package/docs/recipes/oscar64/screenshots/text-overlay-playfield-gameover.png +0 -0
- package/docs/recipes/oscar64/screenshots/text-overlay-playfield-notrail-control.png +0 -0
- package/docs/recipes/oscar64/screenshots/text-overlay-playfield-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/text-overlay-playfield-ungated-control.png +0 -0
- package/docs/recipes/oscar64/screenshots/text-overlay-playfield.png +0 -0
- package/docs/recipes/oscar64/screenshots/text-window-menu-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/text-window-menu.png +0 -0
- package/docs/recipes/oscar64/screenshots/tile-grid-collision-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/tile-grid-collision.png +0 -0
- package/docs/recipes/oscar64/screenshots/tile-map-render-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/tile-map-render.png +0 -0
- package/docs/recipes/oscar64/screenshots/two-player-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/two-player.png +0 -0
- package/docs/recipes/oscar64/screenshots/two-word-parser-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/two-word-parser.png +0 -0
- package/docs/recipes/oscar64/screenshots/vehicle-control-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/vehicle-control.png +0 -0
- package/docs/recipes/oscar64/screenshots/wave-director-ntsc.png +0 -0
- package/docs/recipes/oscar64/screenshots/wave-director.png +0 -0
- package/docs/recipes/oscar64/seeded-level-fill.md +364 -0
- package/docs/recipes/oscar64/sfx-engine.md +514 -0
- package/docs/recipes/oscar64/sid-music-player.md +441 -0
- package/docs/recipes/oscar64/simple-shmup.md +1000 -0
- package/docs/recipes/oscar64/slope-collision.md +610 -0
- package/docs/recipes/oscar64/soft-scroll-h.md +261 -0
- package/docs/recipes/oscar64/sprite-animation-table.md +671 -0
- package/docs/recipes/oscar64/sprite-multiplex-8.md +314 -0
- package/docs/recipes/oscar64/stable-raster-irq.md +236 -0
- package/docs/recipes/oscar64/text-input.md +274 -0
- package/docs/recipes/oscar64/text-overlay-playfield.md +617 -0
- package/docs/recipes/oscar64/text-window-menu.md +551 -0
- package/docs/recipes/oscar64/tile-grid-collision.md +563 -0
- package/docs/recipes/oscar64/tile-map-render.md +395 -0
- package/docs/recipes/oscar64/two-player.md +528 -0
- package/docs/recipes/oscar64/two-word-parser.md +510 -0
- package/docs/recipes/oscar64/vehicle-control.md +771 -0
- package/docs/recipes/oscar64/wave-director.md +787 -0
- package/docs/recipes/runs.json +1606 -0
- package/docs/runtime/sim6502-reference.md +466 -0
- package/docs/runtime/vice-mcp-reference.md +351 -0
- package/docs/runtime/vice-reference.md +1393 -0
- package/docs/techniques/bitmap-modes.md +685 -0
- package/docs/techniques/cpu-cycle-tricks.md +1570 -0
- package/docs/techniques/effects-vector-3d.md +1431 -0
- package/docs/techniques/file-io.md +1427 -0
- package/docs/techniques/input.md +1072 -0
- package/docs/techniques/loaders-packers.md +768 -0
- package/docs/techniques/logic.md +3091 -0
- package/docs/techniques/maths.md +1524 -0
- package/docs/techniques/memory-banking.md +1686 -0
- package/docs/techniques/music-sid.md +1144 -0
- package/docs/techniques/raster.md +1543 -0
- package/docs/techniques/scroll.md +1292 -0
- package/docs/techniques/sprite.md +2566 -0
- package/docs/techniques/text-mode-render.md +717 -0
- package/docs/techniques/text.md +1095 -0
- package/docs/techniques/transitions.md +405 -0
- package/docs/toolchains/cartconv-reference.md +262 -0
- package/docs/toolchains/cc1541-reference.md +316 -0
- package/docs/toolchains/cc65-reference.md +667 -0
- package/docs/toolchains/error-sources/cc65/README.md +1 -0
- package/docs/toolchains/error-sources/cc65/missing-setcpu.s +4 -0
- package/docs/toolchains/error-sources/cc65/range-error.s +4 -0
- package/docs/toolchains/error-sources/cc65/segment-overflow.c +6 -0
- package/docs/toolchains/error-sources/cc65/unresolved-external.c +6 -0
- package/docs/toolchains/error-sources/kickassembler/README.md +1 -0
- package/docs/toolchains/error-sources/kickassembler/branch-out-of-range.asm +4 -0
- package/docs/toolchains/error-sources/kickassembler/failed-assert.asm +3 -0
- package/docs/toolchains/error-sources/kickassembler/flat-lib.asm +4 -0
- package/docs/toolchains/error-sources/kickassembler/import-source-no-namespace.asm +5 -0
- package/docs/toolchains/error-sources/kickassembler/macro-without-parentheses.asm +6 -0
- package/docs/toolchains/error-sources/kickassembler/memory-block-overlap.asm +4 -0
- package/docs/toolchains/error-sources/kickassembler/symbol-clash-lib.asm +5 -0
- package/docs/toolchains/error-sources/kickassembler/symbol-clash-main.asm +6 -0
- package/docs/toolchains/error-sources/kickassembler/unknown-symbol.asm +4 -0
- package/docs/toolchains/error-sources/oscar64/README.md +1 -0
- package/docs/toolchains/error-sources/oscar64/asm-addressing-mode.c +7 -0
- package/docs/toolchains/error-sources/oscar64/region-overflow.c +6 -0
- package/docs/toolchains/error-sources/oscar64/undefined-extern-var.c +5 -0
- package/docs/toolchains/error-sources/oscar64/undefined-extern.c +6 -0
- package/docs/toolchains/error-sources/oscar64/unknown-vic-field.c +6 -0
- package/docs/toolchains/error-sources/oscar64/void-main.c +3 -0
- package/docs/toolchains/kickassembler-reference.md +1020 -0
- package/docs/toolchains/memory-layout-planning.md +362 -0
- package/docs/toolchains/oscar64-headers-reference.md +583 -0
- package/docs/toolchains/oscar64-reference.md +892 -0
- package/docs/toolchains/petcat-reference.md +290 -0
- package/docs/toolchains/png2prg.md +188 -0
- package/docs/toolchains/release-disk.md +314 -0
- package/docs/toolchains/sidreloc.md +236 -0
- package/docs/toolchains/spindle-reference.md +487 -0
- package/docs/toolchains/tape-mastering.md +592 -0
- package/docs/toolchains/unit-testing-6502.md +281 -0
- package/docs/workflow/agent-harness.md +478 -0
- package/package.json +105 -0
- package/templates/_harness/CLAUDE.md.template +91 -0
- package/templates/_harness/PLAN.md.template +72 -0
- package/templates/_harness/check.py +442 -0
- package/templates/_harness/claude/settings.json +17 -0
- package/templates/_harness/gen-asm-header.py +96 -0
- package/templates/_harness/harness.mk +273 -0
- package/templates/_harness/hooks/plan-gate.py +185 -0
- package/templates/_harness/meter/frame_meter.asm +311 -0
- package/templates/_harness/meter/frame_meter.c +155 -0
- package/templates/_harness/meter/frame_meter.h +80 -0
- package/templates/_harness/zp-used.py +104 -0
- package/templates/action-puzzle/.claude/settings.json +17 -0
- package/templates/action-puzzle/.mcp.json +10 -0
- package/templates/action-puzzle/CLAUDE.md +120 -0
- package/templates/action-puzzle/Makefile +125 -0
- package/templates/action-puzzle/PLAN.md +388 -0
- package/templates/action-puzzle/README.md +240 -0
- package/templates/action-puzzle/expect.json +25 -0
- package/templates/action-puzzle/src/cave.c +280 -0
- package/templates/action-puzzle/src/cave.h +80 -0
- package/templates/action-puzzle/src/gen_autopilot.h +20 -0
- package/templates/action-puzzle/src/gen_caves.h +59 -0
- package/templates/action-puzzle/src/gen_notes.h +16 -0
- package/templates/action-puzzle/src/hiscore.c +152 -0
- package/templates/action-puzzle/src/hiscore.h +41 -0
- package/templates/action-puzzle/src/level.c +64 -0
- package/templates/action-puzzle/src/level.h +24 -0
- package/templates/action-puzzle/src/main.c +599 -0
- package/templates/action-puzzle/src/render.c +239 -0
- package/templates/action-puzzle/src/render.h +31 -0
- package/templates/action-puzzle/src/sound.c +158 -0
- package/templates/action-puzzle/src/sound.h +22 -0
- package/templates/action-puzzle/tools/disk_check.py +77 -0
- package/templates/action-puzzle/tools/drive.py +106 -0
- package/templates/action-puzzle/tools/gen.py +454 -0
- package/templates/action-puzzle/tools/model_check.py +49 -0
- package/templates/action-puzzle/tools/verdict_codes.py +24 -0
- package/templates/adventure/.claude/settings.json +17 -0
- package/templates/adventure/.mcp.json +10 -0
- package/templates/adventure/CLAUDE.md +118 -0
- package/templates/adventure/Makefile +113 -0
- package/templates/adventure/PLAN.md +396 -0
- package/templates/adventure/README.md +277 -0
- package/templates/adventure/expect.json +25 -0
- package/templates/adventure/src/engine.c +543 -0
- package/templates/adventure/src/engine.h +48 -0
- package/templates/adventure/src/gen_script.h +141 -0
- package/templates/adventure/src/gen_world.h +511 -0
- package/templates/adventure/src/main.c +439 -0
- package/templates/adventure/src/picture.c +83 -0
- package/templates/adventure/src/picture.h +16 -0
- package/templates/adventure/src/save.c +159 -0
- package/templates/adventure/src/save.h +25 -0
- package/templates/adventure/src/sound.c +71 -0
- package/templates/adventure/src/sound.h +16 -0
- package/templates/adventure/src/text.c +349 -0
- package/templates/adventure/src/text.h +40 -0
- package/templates/adventure/tools/disk_check.py +128 -0
- package/templates/adventure/tools/drive.py +119 -0
- package/templates/adventure/tools/gen.py +1033 -0
- package/templates/adventure/tools/world.py +356 -0
- package/templates/beat-em-up/.claude/settings.json +17 -0
- package/templates/beat-em-up/.mcp.json +10 -0
- package/templates/beat-em-up/CLAUDE.md +136 -0
- package/templates/beat-em-up/Makefile +96 -0
- package/templates/beat-em-up/PLAN.md +502 -0
- package/templates/beat-em-up/README.md +315 -0
- package/templates/beat-em-up/expect-gameover.json +8 -0
- package/templates/beat-em-up/expect.json +29 -0
- package/templates/beat-em-up/src/anim.c +70 -0
- package/templates/beat-em-up/src/art.c +344 -0
- package/templates/beat-em-up/src/autopilot.h +154 -0
- package/templates/beat-em-up/src/brute.c +273 -0
- package/templates/beat-em-up/src/enemy.c +281 -0
- package/templates/beat-em-up/src/engine.asm +512 -0
- package/templates/beat-em-up/src/fighter.c +384 -0
- package/templates/beat-em-up/src/game.h +269 -0
- package/templates/beat-em-up/src/hud.c +135 -0
- package/templates/beat-em-up/src/main.c +341 -0
- package/templates/beat-em-up/src/sound.c +44 -0
- package/templates/beat-em-up/src/street.c +93 -0
- package/templates/beat-em-up/src/verdict.h +523 -0
- package/templates/beat-em-up/src/view.c +362 -0
- package/templates/beat-em-up/tools/drive.py +105 -0
- package/templates/beat-em-up/tools/flickercheck.py +273 -0
- package/templates/demo/.claude/settings.json +17 -0
- package/templates/demo/.mcp.json +10 -0
- package/templates/demo/CLAUDE.md +129 -0
- package/templates/demo/Makefile +66 -0
- package/templates/demo/PLAN.md +401 -0
- package/templates/demo/README.md +322 -0
- package/templates/demo/expect.json +945 -0
- package/templates/demo/src/config.asm +80 -0
- package/templates/demo/src/framework.asm +390 -0
- package/templates/demo/src/main.asm +139 -0
- package/templates/demo/src/music.asm +197 -0
- package/templates/demo/src/part_main.asm +279 -0
- package/templates/demo/src/part_title.asm +79 -0
- package/templates/demo/src/parts.asm +43 -0
- package/templates/demo/src/tables.asm +73 -0
- package/templates/demo/src/verdict.asm +179 -0
- package/templates/demo/tools/audio.py +80 -0
- package/templates/demo/tools/gen_expect.py +167 -0
- package/templates/demo/tools/probe.py +95 -0
- package/templates/hello/.claude/settings.json +17 -0
- package/templates/hello/.mcp.json +10 -0
- package/templates/hello/CLAUDE.md +100 -0
- package/templates/hello/Makefile +38 -0
- package/templates/hello/PLAN.md +200 -0
- package/templates/hello/expect.json +20 -0
- package/templates/hello/src/main.c +161 -0
- package/templates/hello/src/sprite.asm +27 -0
- package/templates/hello-kick/.claude/settings.json +17 -0
- package/templates/hello-kick/.mcp.json +10 -0
- package/templates/hello-kick/CLAUDE.md +100 -0
- package/templates/hello-kick/Makefile +17 -0
- package/templates/hello-kick/PLAN.md +199 -0
- package/templates/hello-kick/expect.json +20 -0
- package/templates/hello-kick/src/main.asm +233 -0
- package/templates/platformer/.claude/settings.json +17 -0
- package/templates/platformer/.mcp.json +10 -0
- package/templates/platformer/CLAUDE.md +125 -0
- package/templates/platformer/Makefile +86 -0
- package/templates/platformer/PLAN.md +360 -0
- package/templates/platformer/README.md +277 -0
- package/templates/platformer/expect.json +32 -0
- package/templates/platformer/src/actors.c +289 -0
- package/templates/platformer/src/anim.c +51 -0
- package/templates/platformer/src/art.c +212 -0
- package/templates/platformer/src/autopilot.h +30 -0
- package/templates/platformer/src/engine.asm +253 -0
- package/templates/platformer/src/game.h +248 -0
- package/templates/platformer/src/hud.c +90 -0
- package/templates/platformer/src/level.c +184 -0
- package/templates/platformer/src/main.c +306 -0
- package/templates/platformer/src/player.c +268 -0
- package/templates/platformer/src/sound.c +42 -0
- package/templates/platformer/src/verdict.h +206 -0
- package/templates/platformer/src/view.c +331 -0
- package/templates/platformer/stage-expect.json +6 -0
- package/templates/platformer/tools/drive.py +112 -0
- package/templates/platformer/tools/tearcheck.py +229 -0
- package/templates/shmup-vertical/.claude/settings.json +17 -0
- package/templates/shmup-vertical/.mcp.json +10 -0
- package/templates/shmup-vertical/CLAUDE.md +137 -0
- package/templates/shmup-vertical/Makefile +131 -0
- package/templates/shmup-vertical/PLAN.md +569 -0
- package/templates/shmup-vertical/README.md +189 -0
- package/templates/shmup-vertical/expect.json +38 -0
- package/templates/shmup-vertical/src/bullets.c +158 -0
- package/templates/shmup-vertical/src/bullets.h +35 -0
- package/templates/shmup-vertical/src/display.c +239 -0
- package/templates/shmup-vertical/src/display.h +40 -0
- package/templates/shmup-vertical/src/game.h +85 -0
- package/templates/shmup-vertical/src/glyph.asm +358 -0
- package/templates/shmup-vertical/src/hiscore.c +141 -0
- package/templates/shmup-vertical/src/hiscore.h +16 -0
- package/templates/shmup-vertical/src/hit.asm +180 -0
- package/templates/shmup-vertical/src/hitbox.c +59 -0
- package/templates/shmup-vertical/src/hitbox.h +25 -0
- package/templates/shmup-vertical/src/kernel.asm +330 -0
- package/templates/shmup-vertical/src/level.c +174 -0
- package/templates/shmup-vertical/src/level.h +27 -0
- package/templates/shmup-vertical/src/main.c +824 -0
- package/templates/shmup-vertical/src/mux.asm +321 -0
- package/templates/shmup-vertical/src/sound.asm +255 -0
- package/templates/shmup-vertical/src/step.asm +169 -0
- package/templates/shmup-vertical/src/waves.c +195 -0
- package/templates/shmup-vertical/src/waves.h +33 -0
- package/templates/shmup-vertical/stage-expect.json +6 -0
- package/templates/shmup-vertical/tools/drive.py +152 -0
- package/templates/shmup-vertical/tools/joytest.py +159 -0
- package/templates/shmup-vertical/tools/meter.py +15 -0
- package/templates/shmup-vertical/tools/phases.py +73 -0
|
@@ -0,0 +1,667 @@
|
|
|
1
|
+
---
|
|
2
|
+
tool: cc65
|
|
3
|
+
tool_kind: c-compiler
|
|
4
|
+
maintainer: cc65-team
|
|
5
|
+
license: Zlib
|
|
6
|
+
home_url: https://cc65.github.io/
|
|
7
|
+
version_verified: "2.18"
|
|
8
|
+
# cl65 --version reports 2.18 while the Homebrew package is labelled 2.19; the Krill page says tagged 2.18 miscompiles Krill, so do not install tagged 2.18 on the strength of this line.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<!-- doc-type: toolchain-reference -->
|
|
12
|
+
|
|
13
|
+
# cc65 — C Compiler and Assembler Suite
|
|
14
|
+
|
|
15
|
+
## Tool
|
|
16
|
+
|
|
17
|
+
cc65 is a complete cross-development package for 65(C)02 systems. It includes a
|
|
18
|
+
C compiler (`cc65`), a macro assembler (`ca65`), a linker (`ld65`), a librarian
|
|
19
|
+
(`ar65`), and a driver wrapper (`cl65`) that orchestrates the whole pipeline. The
|
|
20
|
+
suite targets a wide range of retro platforms; for c64-kb purposes the relevant
|
|
21
|
+
target is `-t c64`.
|
|
22
|
+
|
|
23
|
+
cc65 has an enormous published corpus — decades of tutorials, forum posts, and
|
|
24
|
+
open-source games — which makes it the path of least resistance for LLMs trained
|
|
25
|
+
on that data. **This doc exists primarily to help the agent recognize cc65 patterns
|
|
26
|
+
and evaluate whether switching to [oscar64](oscar64-reference.md) would produce
|
|
27
|
+
tighter, faster code.** In most action-game and demo contexts, it would.
|
|
28
|
+
|
|
29
|
+
**Targets:** 6510
|
|
30
|
+
|
|
31
|
+
## Quick reference
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# macOS
|
|
35
|
+
brew install cc65
|
|
36
|
+
|
|
37
|
+
# Debian / Ubuntu
|
|
38
|
+
sudo apt install cc65
|
|
39
|
+
|
|
40
|
+
# Arch Linux
|
|
41
|
+
sudo pacman -S cc65
|
|
42
|
+
|
|
43
|
+
# Build a single-file program
|
|
44
|
+
cl65 -O -t c64 -o hello.prg hello.c
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Build pipeline
|
|
48
|
+
|
|
49
|
+
The full cc65 pipeline runs three tools in sequence:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
hello.c →[cc65]→ hello.s →[ca65]→ hello.o →[ld65]→ hello.prg
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`cl65` is the driver that invokes each step automatically (see next section).
|
|
56
|
+
Individual tools can be called directly when fine-grained control is needed —
|
|
57
|
+
for example, mixing hand-written ca65 assembly with C translation units.
|
|
58
|
+
|
|
59
|
+
### .PRG — Program file (executable)
|
|
60
|
+
|
|
61
|
+
**Produced by:** cc65
|
|
62
|
+
**Consumed by:** vice, c1541
|
|
63
|
+
|
|
64
|
+
Two-byte load address prefix followed by machine code. The standard C64
|
|
65
|
+
executable format. `ld65` writes this when given the `c64` target config.
|
|
66
|
+
|
|
67
|
+
### .S — C compiler assembly output
|
|
68
|
+
|
|
69
|
+
**Produced by:** cc65
|
|
70
|
+
|
|
71
|
+
Human-readable 6502 assembly emitted by the `cc65` compiler stage. Useful for
|
|
72
|
+
inspecting codegen quality and understanding what overhead the compiler is
|
|
73
|
+
adding. Pass directly to `ca65` or let `cl65` handle it.
|
|
74
|
+
|
|
75
|
+
### .O — Object file
|
|
76
|
+
|
|
77
|
+
**Produced by:** cc65
|
|
78
|
+
**Consumed by:** cc65
|
|
79
|
+
|
|
80
|
+
Relocatable object produced by `ca65`. Contains code, data segments, and
|
|
81
|
+
symbol information. Linked by `ld65` to produce the final binary.
|
|
82
|
+
|
|
83
|
+
### .LIB — Library archive
|
|
84
|
+
|
|
85
|
+
**Produced by:** cc65
|
|
86
|
+
**Consumed by:** cc65
|
|
87
|
+
|
|
88
|
+
Static library archive produced by `ar65`. The standard C64 runtime and
|
|
89
|
+
platform libraries ship as `.lib` files bundled with the cc65 distribution.
|
|
90
|
+
|
|
91
|
+
## The cl65 wrapper
|
|
92
|
+
|
|
93
|
+
`cl65` is the recommended entry point. It detects file types by extension and
|
|
94
|
+
invokes `cc65 → ca65 → ld65` in the right order.
|
|
95
|
+
|
|
96
|
+
Common flags:
|
|
97
|
+
|
|
98
|
+
| Flag | Effect |
|
|
99
|
+
|------|--------|
|
|
100
|
+
| `-t c64` | Set target platform to Commodore 64 |
|
|
101
|
+
| `-O` | Enable basic optimizer pass |
|
|
102
|
+
| `-o hello.prg` | Name the output file |
|
|
103
|
+
| `-Cl` | Static locals (faster, not reentrant; see Pitfalls) |
|
|
104
|
+
| `--config path.cfg` | Use a custom linker config instead of the built-in c64 one |
|
|
105
|
+
| `-T` (`--add-source`) | Interleave the C source as comments in the generated assembly. An earlier version of this row said `-T` keeps intermediate files; it does not, and `cl65` has no such flag. To inspect the `.s`, stop the pipeline with `-S` (or run `cc65 -O -t c64 file.c` directly); `-c` stops after assembling. `cl65` leaves the `.o` files in place by default. |
|
|
106
|
+
|
|
107
|
+
The `-Cl` flag places local variables in BSS rather than on the software stack.
|
|
108
|
+
This cuts call overhead noticeably but breaks reentrancy. Acceptable for most
|
|
109
|
+
C64 code where recursion is deliberate and bounded.
|
|
110
|
+
|
|
111
|
+
For multi-file projects, name each `.c` and `.s` source on the command line and
|
|
112
|
+
`cl65` links them in one pass:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
cl65 -O -t c64 -Cl -o game.prg main.c sprite.c irq.s
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### ca65 notes
|
|
119
|
+
|
|
120
|
+
Hand-written `.s` files go through `ca65`, which differs from KickAssembler in
|
|
121
|
+
three ways that bite (measured with ca65 V2.18, Homebrew cc65 2.19):
|
|
122
|
+
|
|
123
|
+
- Illegal opcodes (`lax`, `sax`, `dcp`, …) need `.setcpu "6502X"` in the file
|
|
124
|
+
or `--cpu 6502X` on the command line; without it every illegal mnemonic
|
|
125
|
+
fails with `Error: ':' expected`, a message that does not name the CPU.
|
|
126
|
+
`lsr a` is accepted. Spellings are in
|
|
127
|
+
[6502-illegal-opcodes.md](../hardware/6502-illegal-opcodes.md) (Pitfalls).
|
|
128
|
+
- Under `-t c64` a string literal is translated to PETSCII, not screen codes:
|
|
129
|
+
`.byte "FILM"` emits `$C6 $C9 $CC $CD` (shifted letters, which `CHROUT`
|
|
130
|
+
draws as graphics glyphs on the power-on charset) and `.byte "film"` emits
|
|
131
|
+
`$46 $49 $4C $4D` (which `CHROUT` draws as `FILM`). Write lowercase in
|
|
132
|
+
source for uppercase on screen. For screen RAM use `.macpack cbm` and
|
|
133
|
+
`scrcode "film"`, which emits `$06 $09 $0C $0D`. There is no
|
|
134
|
+
`cbm_screen_charmap.inc` for ca65; `cbm_screen_charmap.h` is the C-side
|
|
135
|
+
equivalent.
|
|
136
|
+
- A `.s` file linked on its own needs
|
|
137
|
+
`cl65 -t c64 -C c64-asm.cfg -u __EXEHDR__`; the default `c64.cfg` expects
|
|
138
|
+
the C runtime and fails with "Start address of memory area 'BSS' is not
|
|
139
|
+
constant".
|
|
140
|
+
|
|
141
|
+
## Multi-file projects
|
|
142
|
+
|
|
143
|
+
`cl65` compiles each `.c` with `cc65`, assembles each `.s` (and each
|
|
144
|
+
generated `.s`) with `ca65` into a `.o`, and links every `.o` with `ld65`
|
|
145
|
+
in one command; the `cl65` line above is the whole build system. Symbols
|
|
146
|
+
cross the C/assembly boundary by name, with one rule: a C identifier `x`
|
|
147
|
+
is the assembler symbol `_x`. Measured with cl65 V2.18 (Homebrew cc65 2.19)
|
|
148
|
+
on the three files below; the 290-byte `out.prg` turned the border and
|
|
149
|
+
screen green in VICE x64sc 3.10.
|
|
150
|
+
|
|
151
|
+
The header is ordinary C. `__fastcall__` passes the last (here the only)
|
|
152
|
+
argument in A instead of on the software stack, which is what an assembly
|
|
153
|
+
routine wants:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
/* border.h */
|
|
157
|
+
#ifndef BORDER_H
|
|
158
|
+
#define BORDER_H
|
|
159
|
+
extern unsigned char border_calls; /* defined in border.s as _border_calls */
|
|
160
|
+
void __fastcall__ border_set(unsigned char colour);
|
|
161
|
+
#endif
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The module exports the underscored names. `.bss` with `.res` is a variable,
|
|
165
|
+
`.code` is code; both segments are ones `c64.cfg` already places:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
; border.s: ca65 module. C sees border_set and border_calls; the
|
|
169
|
+
; assembler names carry a leading underscore.
|
|
170
|
+
.export _border_set
|
|
171
|
+
.export _border_calls
|
|
172
|
+
|
|
173
|
+
.bss
|
|
174
|
+
_border_calls: .res 1
|
|
175
|
+
|
|
176
|
+
.code
|
|
177
|
+
; void __fastcall__ border_set(unsigned char colour): colour arrives in A
|
|
178
|
+
_border_set:
|
|
179
|
+
sta $d020
|
|
180
|
+
sta $d021
|
|
181
|
+
inc _border_calls
|
|
182
|
+
rts
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
```text
|
|
186
|
+
/* main.c */
|
|
187
|
+
#include "border.h"
|
|
188
|
+
int main(void)
|
|
189
|
+
{
|
|
190
|
+
border_set(5);
|
|
191
|
+
while (border_calls) ;
|
|
192
|
+
return 0;
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
cl65 -t c64 -O -o out.prg main.c border.s --mapfile out.map
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The other direction is `.import _name` in the `.s` for a C function or
|
|
201
|
+
variable, and `jsr _name` (not measured here). `--mapfile` is how to
|
|
202
|
+
confirm what linked. Its "Segment list" gives every segment's start, end
|
|
203
|
+
and size (`CODE 000840 0008B5 000076`, `BSS 0008FB 0008FB 000001` for this
|
|
204
|
+
build) and its "Exports list" gives every cross-unit symbol with its
|
|
205
|
+
address and the module that defined it: `_main 000840`,
|
|
206
|
+
`_border_set 00084C`, `_border_calls 0008FB`, each followed by `RLA`
|
|
207
|
+
(relocatable label address). A symbol you expected and cannot find in the
|
|
208
|
+
Exports list was never `.export`ed, which is the failing form. Delete the
|
|
209
|
+
`.export _border_set` line and the link stops:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
Unresolved external '_border_set' referenced in:
|
|
213
|
+
main.s(29)
|
|
214
|
+
ld65: Error: 1 unresolved external(s) found - cannot create output file
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
`main.s(29)` is the generated assembly of `main.c`, not a line of the C
|
|
218
|
+
file; `cl65 -S main.c` writes it if you need the line. The whole-program
|
|
219
|
+
view of where each segment lands, and how to move one, is
|
|
220
|
+
[memory-layout-planning.md](memory-layout-planning.md).
|
|
221
|
+
|
|
222
|
+
## Standard library highlights
|
|
223
|
+
|
|
224
|
+
cc65 ships extensive C64-specific headers alongside the standard ones. The
|
|
225
|
+
table below covers the subset relevant to typical C64 use:
|
|
226
|
+
|
|
227
|
+
| Header | Purpose |
|
|
228
|
+
|--------|---------|
|
|
229
|
+
| `conio.h` | Text-mode console I/O: `clrscr()`, `cputs()`, `gotoxy()`, `cgetc()` |
|
|
230
|
+
| `cbm.h` | KERNAL and BASIC bindings: `cbm_open()`, `cbm_read()`, `cbm_close()` |
|
|
231
|
+
| `peekpoke.h` | `PEEK(addr)` / `POKE(addr, val)` macros for direct memory access |
|
|
232
|
+
| `joystick.h` | Joystick port reading via `joy_read()` |
|
|
233
|
+
| `6502.h` | Low-level CPU operations: `BRK()`, `CLI()`, `SEI()` |
|
|
234
|
+
| `stdio.h` | Standard I/O — available but large; prefer `conio.h` for text output |
|
|
235
|
+
| `string.h` | Standard string functions |
|
|
236
|
+
|
|
237
|
+
`conio.h` is the idiomatic output library for text-mode programs. `cbm.h`
|
|
238
|
+
exposes the KERNAL routines via C-callable wrappers without requiring inline
|
|
239
|
+
assembly. `peekpoke.h` fills the gap where C's type system would otherwise
|
|
240
|
+
require casts through pointers.
|
|
241
|
+
|
|
242
|
+
## When to use cc65
|
|
243
|
+
|
|
244
|
+
- **Text-mode utilities and tools** — BASIC replacements, directory listers,
|
|
245
|
+
config editors. The `conio.h` API covers the use-case well and the corpus
|
|
246
|
+
of examples is large.
|
|
247
|
+
- **Corpus-heavy domains** — when training data for a specific pattern (e.g. CBM
|
|
248
|
+
serial bus access via `cbm.h`) is overwhelmingly cc65-flavored, using cc65
|
|
249
|
+
lowers the chance the agent generates incorrect Oscar64 translations.
|
|
250
|
+
- **Educational contrast** — studying a cc65 `.s` output alongside Oscar64's
|
|
251
|
+
output for the same source is a reliable way to demonstrate where and why
|
|
252
|
+
Oscar64 wins on codegen.
|
|
253
|
+
- **Porting POSIX-adjacent code** — cc65's header set is closer to standard C
|
|
254
|
+
than Oscar64's, so porting a small existing utility is occasionally easier
|
|
255
|
+
here first.
|
|
256
|
+
|
|
257
|
+
## When NOT to use cc65
|
|
258
|
+
|
|
259
|
+
- **Action games, scrollers, platformers** — frame budgets are tight. cc65's
|
|
260
|
+
function-call overhead and absence of register allocation make inner loops
|
|
261
|
+
measurably slower than Oscar64 equivalents.
|
|
262
|
+
- **Demos, raster effects, sprite multiplexers** — cycle-exact timing work.
|
|
263
|
+
cc65 is not cycle-aware. Use Oscar64 for C code and KickAssembler for
|
|
264
|
+
hand-rolled timing routines.
|
|
265
|
+
- **Anything that needs bitfields or packed structs** — cc65 as installed
|
|
266
|
+
(V2.18; the Homebrew Cellar directory says 2.19 but `cl65 --version` reports
|
|
267
|
+
V2.18) accepts bit-fields only of type `int`, `unsigned int` or `enum`. It
|
|
268
|
+
is not a size rule, as an earlier version of this page said ("int-sized or
|
|
269
|
+
smaller"): `unsigned char x:3;` AND `unsigned short x:3;` (int-sized on
|
|
270
|
+
cc65) both fail with `Bit-field has invalid type` (measured 2026-09-22).
|
|
271
|
+
Newer git cc65 is reported to relax this (unverified here); do not rely on
|
|
272
|
+
char-typed bit-fields from a distro package. Oscar64 treats them as
|
|
273
|
+
first-class.
|
|
274
|
+
- **Code-size-sensitive releases** — cc65 produces larger binaries for
|
|
275
|
+
equivalent logic. Under the built-in `c64.cfg` a program gets
|
|
276
|
+
`$080D`–`$D000`: 51,187 bytes, about 50 KB, the top 2 KB of it the software
|
|
277
|
+
stack (`cl65 -Ln` symbols `__MAIN_START__`, `__HIMEM__`, `__STACKSIZE__`;
|
|
278
|
+
the startup code banks BASIC ROM out). An earlier version of this page said
|
|
279
|
+
38 KB, which is BASIC's free-bytes figure, not cc65's. Code size still
|
|
280
|
+
matters on a machine this small.
|
|
281
|
+
|
|
282
|
+
The rule of thumb: if Oscar64 has a clear idiom for the task (see
|
|
283
|
+
[oscar64-reference.md](oscar64-reference.md)), use Oscar64. Reach for cc65 only
|
|
284
|
+
when the corpus availability advantage is concrete and measurable.
|
|
285
|
+
|
|
286
|
+
## Linker configs
|
|
287
|
+
|
|
288
|
+
`ld65` is driven by a linker configuration file that describes the target's
|
|
289
|
+
memory map, segments, and output format. The cc65 distribution ships a
|
|
290
|
+
ready-made config for the C64 at `cfg/c64.cfg`. For most programs, the
|
|
291
|
+
`-t c64` flag loads this config automatically.
|
|
292
|
+
|
|
293
|
+
The built-in config maps the standard segments:
|
|
294
|
+
|
|
295
|
+
- `EXEHDR` — the BASIC stub (`SYS 2061`) at `$0801`–`$080C`; `STARTUP` — the
|
|
296
|
+
C runtime entry, at `$080D` (the stub's SYS target); `LOWCODE` (optional)
|
|
297
|
+
then `CODE` — your compiled code, after STARTUP (`$0840` for a minimal
|
|
298
|
+
conio program built with cc65 2.19 — read the `--mapfile` segment list
|
|
299
|
+
rather than assuming a fixed address; an earlier version of this page put
|
|
300
|
+
`CODE` at `$0801`, which is the stub itself); then `RODATA`, `DATA`,
|
|
301
|
+
`INIT`, `ONCE` in that order within MAIN.
|
|
302
|
+
- `RODATA` — read-only data, placed after CODE
|
|
303
|
+
- `DATA` — initialized writable data
|
|
304
|
+
- `BSS` — zero-initialised (cleared at startup by the runtime)
|
|
305
|
+
- `ZEROPAGE` — `$02–$1B`, 26 bytes, all consumed by the cc65 runtime
|
|
306
|
+
(`zpspace = 26` in `asminc/zeropage.inc`). An earlier version of this page
|
|
307
|
+
said "allocate sparingly"; there is nothing to allocate. Adding even one
|
|
308
|
+
byte to this segment under the built-in c64 config fails to link
|
|
309
|
+
(`Segment 'ZEROPAGE' overflows memory area 'ZP' by 1 byte`, measured with
|
|
310
|
+
cc65 2.19). For your own zero-page variables, copy `cfg/c64.cfg` and add a
|
|
311
|
+
second zero-page area on the four bytes BASIC and the KERNAL leave free —
|
|
312
|
+
e.g. `ZP2: file = "", start = $00FB, size = $0004;` in MEMORY and
|
|
313
|
+
`EXTZP: load = ZP2, type = zp, optional = yes;` in SEGMENTS — then define
|
|
314
|
+
the variable in assembly (`.segment "EXTZP" : zeropage` / `_myzp: .res 1`)
|
|
315
|
+
and expose it to C with `extern unsigned char myzp; #pragma zpsym("myzp")`
|
|
316
|
+
(the pragma must follow the declaration). Do not simply enlarge `ZP` past
|
|
317
|
+
`$1B`: `$1C` onward is BASIC/KERNAL workspace. Six of the runtime's 26
|
|
318
|
+
bytes are the `register` bank, so `register` locals (with `-Or`) are the
|
|
319
|
+
only zero-page you get without a custom config.
|
|
320
|
+
|
|
321
|
+
For non-standard layouts — cartridges, custom load addresses, split-bank
|
|
322
|
+
programs — write a custom `.cfg` file and pass it with `--config`. The
|
|
323
|
+
linker config language is well-documented in the cc65 `ld65` manual and
|
|
324
|
+
the existing `cfg/c64.cfg` is a readable starting template.
|
|
325
|
+
|
|
326
|
+
## Cartridge builds
|
|
327
|
+
|
|
328
|
+
A generic 8 KB cartridge is a linker configuration, a start-up routine
|
|
329
|
+
and a container. The [cartridge-8k](../recipes/cc65/cartridge-8k.md)
|
|
330
|
+
recipe is the worked example; every figure below was measured on it with
|
|
331
|
+
cc65 2.19 (`cl65` reports V2.18) and VICE x64sc 3.10.
|
|
332
|
+
|
|
333
|
+
**The configuration.** Line by line, what each area and segment does:
|
|
334
|
+
|
|
335
|
+
```cfg
|
|
336
|
+
SYMBOLS {
|
|
337
|
+
__STACKSIZE__: type = weak, value = $0800;
|
|
338
|
+
__STARTUP__: type = export, value = 1;
|
|
339
|
+
}
|
|
340
|
+
MEMORY {
|
|
341
|
+
ZP: file = "", start = $0002, size = $001A, define = yes;
|
|
342
|
+
CRTHDR: file = "game.crt", start = $0000, size = $0050, fill = yes;
|
|
343
|
+
ROML: file = "game.crt", start = $8000, size = $2000, fill = yes, fillval = $FF, define = yes;
|
|
344
|
+
RAM: file = "", start = $0800, size = $D000 - __STACKSIZE__ - $0800, define = yes;
|
|
345
|
+
}
|
|
346
|
+
SEGMENTS {
|
|
347
|
+
ZEROPAGE: load = ZP, type = zp;
|
|
348
|
+
CRTHDR: load = CRTHDR, type = ro;
|
|
349
|
+
CBM80: load = ROML, type = ro;
|
|
350
|
+
STARTUP: load = ROML, type = ro;
|
|
351
|
+
ONCE: load = ROML, type = ro, optional = yes;
|
|
352
|
+
CODE: load = ROML, type = ro;
|
|
353
|
+
RODATA: load = ROML, type = ro;
|
|
354
|
+
DATA: load = ROML, run = RAM, type = rw, define = yes;
|
|
355
|
+
BSS: load = RAM, type = bss, define = yes;
|
|
356
|
+
}
|
|
357
|
+
FEATURES {
|
|
358
|
+
CONDES: type = constructor, label = __CONSTRUCTOR_TABLE__, count = __CONSTRUCTOR_COUNT__, segment = ONCE;
|
|
359
|
+
CONDES: type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__, segment = RODATA;
|
|
360
|
+
CONDES: type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__, segment = RODATA, import = __CALLIRQ__;
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
This is the recipe's file with its comments and two empty optional
|
|
365
|
+
segments (`LOWCODE`, `INIT`) removed; the recipe page holds the complete
|
|
366
|
+
file, and this block links as it stands (run here: the same `.crt`,
|
|
367
|
+
byte for byte).
|
|
368
|
+
|
|
369
|
+
- `__STACKSIZE__` is the C stack, which the start-up code puts at the top
|
|
370
|
+
of `RAM`, so `RAM` ends `$0800` below `$D000`.
|
|
371
|
+
- `__STARTUP__` exported here satisfies the `.forceimport __STARTUP__`
|
|
372
|
+
the compiler emits for `main`, so the library's `crt0` stays out.
|
|
373
|
+
Without the export the link fails with `Unresolved external
|
|
374
|
+
'__MAIN_SIZE__' referenced in: c64/crt0.s(96)` and the same for
|
|
375
|
+
`__MAIN_START__` (run here): that `crt0` sizes its stack from a `MAIN`
|
|
376
|
+
area a cartridge configuration does not have.
|
|
377
|
+
- `ZP` is the runtime's 26 zero-page bytes, unchanged from `c64.cfg`.
|
|
378
|
+
- `CRTHDR` is the 80 bytes of `.CRT` header and `CHIP` packet, at file
|
|
379
|
+
offset 0; `fill = yes` keeps it 80 bytes if the segment is short.
|
|
380
|
+
- `ROML` is the 8 KB the cartridge maps at `$8000`, padded with `$FF`
|
|
381
|
+
to the size the packet declares.
|
|
382
|
+
- `RAM` is where writable data runs; it is written to no file.
|
|
383
|
+
- `CBM80` comes first in `ROML` so its nine bytes land at `$8000`.
|
|
384
|
+
- `STARTUP` is the cold-start routine; `ONCE` holds library constructor
|
|
385
|
+
code (12 bytes for conio); `CODE` and `RODATA` are read-only and stay
|
|
386
|
+
in ROM.
|
|
387
|
+
- `DATA` has `load = ROML` and `run = RAM`: the image is in ROM, every
|
|
388
|
+
address the code uses is in RAM, and `define = yes` gives `copydata`
|
|
389
|
+
the three symbols it needs.
|
|
390
|
+
- `BSS` is RAM only, zeroed at start.
|
|
391
|
+
- `FEATURES` is `c64.cfg`'s own block and must stay: the runtime's
|
|
392
|
+
`condes.s` imports the constructor and destructor table symbols
|
|
393
|
+
whether or not anything uses them. With the block left out, `ld65`
|
|
394
|
+
stops with `Unresolved external '__CONSTRUCTOR_COUNT__' referenced
|
|
395
|
+
in: runtime/condes.s(30)`, the same for `__CONSTRUCTOR_TABLE__`,
|
|
396
|
+
`__DESTRUCTOR_COUNT__` and `__DESTRUCTOR_TABLE__`, then `4 unresolved
|
|
397
|
+
external(s) found`, and writes no `.crt` (run here). The constructor
|
|
398
|
+
table goes in `ONCE`, the other two in `RODATA`, all in ROM, which is
|
|
399
|
+
where a table of addresses belongs.
|
|
400
|
+
|
|
401
|
+
Both areas that reach a file name it outright, so `ld65` writes the
|
|
402
|
+
finished container and the `.prg` named by `-o` never appears. This is
|
|
403
|
+
the route the repository's recipe verifier needs, since it boots what
|
|
404
|
+
the build leaves behind; `c64.cfg`'s `LOADADDR` and `EXEHDR` segments,
|
|
405
|
+
and the `__LOADADDR__`/`__EXEHDR__` imports that pull them in, are gone
|
|
406
|
+
with the stub. With `__EXEHDR__: type = import;` left in, `ld65` stops
|
|
407
|
+
with `Missing memory area assignment for segment 'EXEHDR'`, after a
|
|
408
|
+
warning that it cannot evaluate an assertion in `cbm/exehdr.s`, and it
|
|
409
|
+
still left a `.crt` behind (run here), so read the messages and not the
|
|
410
|
+
directory.
|
|
411
|
+
|
|
412
|
+
**The signature.** The KERNAL's reset code compares the five bytes at
|
|
413
|
+
`$8004` with `$C3 $C2 $CD $38 $30` before it initialises anything, and on
|
|
414
|
+
a match jumps through the vector at `$8000`; the `RESTORE` key's NMI
|
|
415
|
+
makes the same test and takes `$8002`. In C, a `const` struct of two
|
|
416
|
+
function pointers and five bytes in the `CBM80` segment is nine bytes
|
|
417
|
+
with no padding.
|
|
418
|
+
|
|
419
|
+
**The start-up code.** cc65 2.19 has no file-scope `asm` (`__asm__ is
|
|
420
|
+
not allowed here`) and its inline `asm` refuses `.segment`, `.byte` and
|
|
421
|
+
`.res`, so the routine is a C function of inline instructions in the
|
|
422
|
+
`STARTUP` segment, no arguments and no locals, which gives it no
|
|
423
|
+
prologue. It sets the hardware stack, calls `IOINIT`, `RAMTAS`, `RESTOR`
|
|
424
|
+
and `CINT` in that order, then `zerobss`, `copydata`, sets `sp` to the
|
|
425
|
+
top of `RAM`, and calls `initlib` and `callmain`. The library names
|
|
426
|
+
resolve because the compiler switches `.autoimport` on in every file it
|
|
427
|
+
emits. Measured: the KERNAL takes the vector 109 cycles after power-on;
|
|
428
|
+
`main` is entered 1,650,044 cycles later on PAL and 1,643,133 on NTSC.
|
|
429
|
+
The split, from `trace exec` on each call (run here, PAL): `IOINIT` and
|
|
430
|
+
the stack set 147, `RAMTAS` 1,593,289, `RESTOR` 889, `CINT` 53,221,
|
|
431
|
+
`CLI` to `main` 2,498, of which the on-screen CIA timer covers 2,281.
|
|
432
|
+
`RAMTAS`, the KERNAL's test of every RAM byte below the cartridge, is
|
|
433
|
+
96.5 % of it; `CINT` is the one stage that differs on NTSC (46,310).
|
|
434
|
+
`IOINIT` writes all four CIA control registers 34 to 46 cycles after the
|
|
435
|
+
first cartridge instruction (stopwatch 143 to 155, `trace store` on
|
|
436
|
+
`$DC0E`, `$DC0F`, `$DD0E`, `$DD0F`), which is why a CIA timer cannot span
|
|
437
|
+
the KERNAL part and the monitor's stopwatch has to.
|
|
438
|
+
|
|
439
|
+
**Load versus run.** The `DATA` copy exists because a cartridge cannot
|
|
440
|
+
take a write. With `load = ROML` alone the same program booted, entered
|
|
441
|
+
`main`, and hit a `BRK` 1,049 cycles into its first `cprintf`; nothing
|
|
442
|
+
was printed and the KERNAL's `BRK` path at `$FE66` ran fifty-five times
|
|
443
|
+
before the cycle limit. The runtime keeps writable state in `DATA` too,
|
|
444
|
+
and it was reading its image back from ROM. The globals did not read as
|
|
445
|
+
zero; they read as their initialisers, and writes to them were lost.
|
|
446
|
+
|
|
447
|
+
**The wrap.** The recipe's header is written by the linker, and the same
|
|
448
|
+
8 KB image fed to `cartconv -t normal -i rom.bin -o game.crt -n "NAME"`
|
|
449
|
+
gave a byte-identical file. Either route ends in `cartconv -c` (exit 0)
|
|
450
|
+
and `cartconv -f`, which prints the hardware id, the `EXROM`/`GAME`
|
|
451
|
+
levels and one `CHIP` at `$8000`
|
|
452
|
+
([cartconv-reference](cartconv-reference.md)).
|
|
453
|
+
|
|
454
|
+
**Pitfalls met.** Character literals are translated to PETSCII by
|
|
455
|
+
`-t c64`, so `'C'` in the header initialiser became `$C3`; VICE answered
|
|
456
|
+
`no CRT header found` and `cartconv -f` printed nothing and exited 0.
|
|
457
|
+
Write the signature and name as numeric bytes. And a `DATA` segment
|
|
458
|
+
without `run` links clean, boots, and fails inside the library, not in
|
|
459
|
+
your own code.
|
|
460
|
+
|
|
461
|
+
## Idioms — cc65 vs Oscar64
|
|
462
|
+
|
|
463
|
+
cc65 and Oscar64 differ in ways that matter at the codegen level. The agent
|
|
464
|
+
should recognize these patterns to avoid inadvertently reaching for the weaker
|
|
465
|
+
option.
|
|
466
|
+
|
|
467
|
+
**Function call overhead.** cc65 uses a software stack (pointed to by `sp`
|
|
468
|
+
in zero page, but located in main RAM below `__HIMEM__`; an earlier version
|
|
469
|
+
of this page put the stack itself in zero page) for passing arguments. Each
|
|
470
|
+
call pushes and pops arguments through this stack, adding several cycles per
|
|
471
|
+
parameter. Oscar64 passes leaf-function arguments in fixed zero-page slots
|
|
472
|
+
(what its manual calls "zero-page registers": `$0D` upward, `P0`/`P1`/…),
|
|
473
|
+
chosen by whole-program analysis, and falls back to its own software stack
|
|
474
|
+
only for non-leaf or recursive functions (see
|
|
475
|
+
[oscar64-reference.md](oscar64-reference.md)); nothing is passed in A/X/Y.
|
|
476
|
+
cc65's default `__fastcall__` convention does put the rightmost argument in
|
|
477
|
+
A/X and pushes the rest through its `sp`-indexed software stack. Oscar64's
|
|
478
|
+
inner loops are substantially cheaper. If a function is called in a tight
|
|
479
|
+
raster IRQ or per-scanline loop, the cc65 overhead accumulates into missed
|
|
480
|
+
raster windows.
|
|
481
|
+
|
|
482
|
+
**Bitfields.** Oscar64 supports bitfields in structs natively and maps them
|
|
483
|
+
to efficient read-modify-write sequences. cc65 supports them with restrictions
|
|
484
|
+
(only `int`/`unsigned int`/`enum` members; `unsigned char` fields do not
|
|
485
|
+
compile) and the codegen is less predictable. Writing a hardware
|
|
486
|
+
register struct like `VIC_CR1` with bitfields is idiomatic Oscar64; in cc65
|
|
487
|
+
the same code requires explicit masks and shifts or falls back to `POKE`.
|
|
488
|
+
|
|
489
|
+
**Struct-by-value.** Passing structs by value in cc65 is expensive — the
|
|
490
|
+
compiler copies through the software stack. Oscar64 handles small structs in
|
|
491
|
+
registers. Where the code passes hardware-register shadow structs or sprite
|
|
492
|
+
coordinate pairs around frequently, Oscar64's ABI wins clearly.
|
|
493
|
+
|
|
494
|
+
**Static locals via `-Cl`.** cc65's `-Cl` flag converts local variables to
|
|
495
|
+
static (BSS) allocation. This is a performance hack that produces faster code
|
|
496
|
+
at the cost of reentrancy. Oscar64 does not need this flag because it performs
|
|
497
|
+
stack allocation analysis and promotes locals to registers or static storage
|
|
498
|
+
automatically where safe.
|
|
499
|
+
|
|
500
|
+
**Choosing cc65.** The agent picks cc65 when the corpus availability advantage
|
|
501
|
+
is real: a known-working cc65 snippet for CBM serial I/O, or a text-mode UI
|
|
502
|
+
library built around `conio.h`, is worth more than a theoretically optimal
|
|
503
|
+
Oscar64 translation that may contain ABI errors. When the task is creative
|
|
504
|
+
(new code, not porting), default to Oscar64.
|
|
505
|
+
|
|
506
|
+
## Debugging with VICE
|
|
507
|
+
|
|
508
|
+
`cl65 -Ln <file>` makes the linker write a VICE label file. Built from
|
|
509
|
+
[recipes/cc65/hello-world-conio.md](../recipes/cc65/hello-world-conio.md):
|
|
510
|
+
|
|
511
|
+
```bash
|
|
512
|
+
cl65 -O -t c64 -Ln hello.lbl -o hello.prg hello.c
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
`hello.lbl` is one `al` command per symbol, six hex digits, no memspace
|
|
516
|
+
prefix, and a leading underscore on every C symbol. The file also names
|
|
517
|
+
the KERNAL entries the library imports:
|
|
518
|
+
|
|
519
|
+
```text
|
|
520
|
+
al 000840 ._main
|
|
521
|
+
al 0008EA ._cputs
|
|
522
|
+
al 00E544 ._clrscr
|
|
523
|
+
al 00FFD2 .BSOUT
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
Load it and arm a breakpoint from a `-moncommands` file:
|
|
527
|
+
|
|
528
|
+
```text
|
|
529
|
+
ll "hello.lbl"
|
|
530
|
+
break ._main
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
Run with the remote text monitor and connect to the port (the flags and
|
|
534
|
+
the reason `-console` is not used are in
|
|
535
|
+
[../runtime/vice-reference.md](../runtime/vice-reference.md), "Text
|
|
536
|
+
monitor for debugging"):
|
|
537
|
+
|
|
538
|
+
```bash
|
|
539
|
+
GSETTINGS_SCHEMA_DIR=/opt/homebrew/share/glib-2.0/schemas timeout 180 x64sc -default -warp +sound \
|
|
540
|
+
+autostart-delay-random -autostartprgmode 1 -limitcycles 6000000 \
|
|
541
|
+
-remotemonitor -remotemonitoraddress ip4://127.0.0.1:6510 \
|
|
542
|
+
-moncommands hello.mon -autostart hello.prg
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
The break hit, with the label resolved in both the stop and the
|
|
546
|
+
disassembly of the first instruction of `main()`:
|
|
547
|
+
|
|
548
|
+
```text
|
|
549
|
+
#1 (Stop on exec 0840) 55/$037, 52/$34
|
|
550
|
+
.C:0840 20 44 E5 JSR ._clrscr - A:00 X:00 Y:04 SP:f4 ..-....C 2971573
|
|
551
|
+
(C:$0840) break
|
|
552
|
+
BREAK: 1 C:$0840 (Stop on exec)
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
`$0840` is `_main` in the label file and in `--mapfile`'s Exports list
|
|
556
|
+
(see Multi-file projects). Measured with cc65 V2.18 and VICE x64sc 3.10.
|
|
557
|
+
`print ._main` is refused with `Wrong syntax`; the label is usable as an
|
|
558
|
+
address in `break`, `watch`, `m` and `until`, not as an expression to
|
|
559
|
+
print. The symbol export material for the other toolchains is in
|
|
560
|
+
[kickassembler-reference.md](kickassembler-reference.md) ("Symbol export
|
|
561
|
+
for VICE/vice-mcp" and "Debugging with VICE") and
|
|
562
|
+
[oscar64-reference.md](oscar64-reference.md) ("Debugging").
|
|
563
|
+
|
|
564
|
+
## Pitfalls
|
|
565
|
+
|
|
566
|
+
**Static initializers in ROM sections.** The cc65 `DATA` segment holds
|
|
567
|
+
initialized writable data. If a custom linker config accidentally places `DATA`
|
|
568
|
+
in a ROM region, the program links clean and misbehaves at run time.
|
|
569
|
+
Always verify the segment map with `--mapfile` output. An earlier version of
|
|
570
|
+
this entry said the globals read back as zeros; measured on the
|
|
571
|
+
[cartridge-8k](../recipes/cc65/cartridge-8k.md) recipe with `DATA` in ROM,
|
|
572
|
+
they read back their initialisers, writes to them were lost, and the run
|
|
573
|
+
ended in a `BRK` inside `cprintf` ("Cartridge builds" above).
|
|
574
|
+
|
|
575
|
+
**Stack overflow with deep call trees.** cc65's software stack is 2 KB by
|
|
576
|
+
default on the C64 (`__STACKSIZE__ = $0800` in `c64.cfg`); it starts at
|
|
577
|
+
`__HIMEM__` ($D000) and grows downward through $C800, immediately above the
|
|
578
|
+
heap and BSS. Only the two-byte stack pointer `sp` lives in zero page
|
|
579
|
+
($02/$03). An earlier version of this page said the stack was in zero page
|
|
580
|
+
and about 256 bytes; both were wrong. Deep recursion overflows it silently
|
|
581
|
+
downward into heap and BSS data, not into zero page. Raise it with
|
|
582
|
+
`-Wl -D,__STACKSIZE__=0x1000` (if you write `$1000`, quote it — an unquoted
|
|
583
|
+
`$1000` is eaten by the shell and ld65 reports `Invalid definition`) or a
|
|
584
|
+
custom linker config; keep call depth shallow and prefer iterative
|
|
585
|
+
algorithms. `-Cl` moves locals off the stack, which reduces per-frame usage,
|
|
586
|
+
but does not protect against deep recursion itself.
|
|
587
|
+
|
|
588
|
+
**`printf` code size.** `printf` from `stdio.h` pulls in the full format-string
|
|
589
|
+
parser, adding roughly 2–3 KB to the binary. For output in a C64 program,
|
|
590
|
+
`cputs()` from `conio.h` or a direct KERNAL `CHROUT` call (via `cbm.h`) is
|
|
591
|
+
far smaller. Reserve `printf` for debugging builds only.
|
|
592
|
+
|
|
593
|
+
**Mixing `conio.h` screen coordinates with direct VIC writes.** `conio.h`
|
|
594
|
+
maintains its own cursor state. Writing directly to screen RAM (`$0400`) or
|
|
595
|
+
color RAM (`$D800`) bypasses that state. Either use `conio.h` exclusively for
|
|
596
|
+
text output, or bypass it entirely and drive the hardware directly.
|
|
597
|
+
|
|
598
|
+
**Implicit `int` promotions.** 8-bit values compared or computed in expressions
|
|
599
|
+
get promoted to `int` (16-bit) in C. cc65 emits 16-bit arithmetic sequences
|
|
600
|
+
for these promotions. Use explicit `uint8_t` casts in hot paths to get 8-bit
|
|
601
|
+
sequences.
|
|
602
|
+
|
|
603
|
+
## Reading the errors
|
|
604
|
+
|
|
605
|
+
Every message below was provoked with cl65 V2.18 (Homebrew cc65 2.19,
|
|
606
|
+
`cl65 -t c64 -O`) on the minimal source named in the second column; the
|
|
607
|
+
sources are files in `error-sources/cc65/` and are shown after the table.
|
|
608
|
+
Compiler and assembler errors read `file(line): Error: text`; linker errors
|
|
609
|
+
are prefixed `ld65:` and name the linker config and its line, not your
|
|
610
|
+
source. Each build exits 1 and writes no PRG.
|
|
611
|
+
|
|
612
|
+
| Message (verbatim) | Source | Cause | Fix |
|
|
613
|
+
|---|---|---|---|
|
|
614
|
+
| `ld65: Warning: .../cfg/c64.cfg(15): Segment 'BSS' overflows memory area 'BSS' by 1088 bytes` then `ld65: Error: Cannot generate most of the files due to memory area overflow` | `segment-overflow.c` | The program's data (here a 50,000-byte array) does not fit between the end of the code and the software stack under `$D000`. The overflow is reported as a warning; the error line is the one that stops the build | Shrink the data, lower `__STACKSIZE__` (see Pitfalls), or a custom config: [memory-layout-planning.md](memory-layout-planning.md) |
|
|
615
|
+
| `Unresolved external '_missing' referenced in:` then ` unresolved-external.s(27)` then `ld65: Error: 1 unresolved external(s) found - cannot create output file` | `unresolved-external.c` | A function or variable was declared and used but no object defined it: a `.s` module without `.export _name`, or a `.c` or `.s` left off the `cl65` line. The reference is located in the generated `.s`, not in the C source | Add the `.export`, or the file to the command line (see Multi-file projects) |
|
|
616
|
+
| `range-error.s(3): Error: Range error (300 not in [0..255])` | `range-error.s` | An 8-bit operand or `.byte` given a value outside 0..255, here `lda #300`. A `.word` beyond 65535 gives the same shape with `[0..65535]` (arithmetic, not measured here) | Use `#<value` / `#>value` for one byte of a 16-bit constant, or `.word` |
|
|
617
|
+
| `missing-setcpu.s(3): Error: ':' expected` then `missing-setcpu.s(3): Error: Unexpected trailing garbage characters` | `missing-setcpu.s` | An illegal mnemonic (`lax $10`) under the default CPU. `ca65` does not know the word, reads it as a label and expects a colon; the message never names the CPU (see ca65 notes) | `.setcpu "6502X"` at the top of the file, or `--cpu 6502X` on the command line; both assemble the file (measured) |
|
|
618
|
+
|
|
619
|
+
Sources (each is meant to fail, so none is in a buildable fence):
|
|
620
|
+
|
|
621
|
+
`segment-overflow.c`
|
|
622
|
+
|
|
623
|
+
```text
|
|
624
|
+
unsigned char big[50000U];
|
|
625
|
+
int main(void)
|
|
626
|
+
{
|
|
627
|
+
big[0] = 1;
|
|
628
|
+
return big[1];
|
|
629
|
+
}
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
`unresolved-external.c`
|
|
633
|
+
|
|
634
|
+
```text
|
|
635
|
+
extern void missing(void);
|
|
636
|
+
int main(void)
|
|
637
|
+
{
|
|
638
|
+
missing();
|
|
639
|
+
return 0;
|
|
640
|
+
}
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
`range-error.s`
|
|
644
|
+
|
|
645
|
+
```text
|
|
646
|
+
.export _main
|
|
647
|
+
_main:
|
|
648
|
+
lda #300
|
|
649
|
+
rts
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
`missing-setcpu.s`
|
|
653
|
+
|
|
654
|
+
```text
|
|
655
|
+
.export _main
|
|
656
|
+
_main:
|
|
657
|
+
lax $10
|
|
658
|
+
rts
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
## See also
|
|
662
|
+
|
|
663
|
+
- [oscar64-reference.md](oscar64-reference.md) — primary toolchain; most C64 code should start here
|
|
664
|
+
- [kickassembler-reference.md](kickassembler-reference.md) — cycle-tight assembly escape hatch
|
|
665
|
+
- [recipes/cc65/hello-world-conio.md](../recipes/cc65/hello-world-conio.md) — minimal working cc65 program
|
|
666
|
+
- [memory-layout-planning.md](memory-layout-planning.md) — whole-program layout: the constraints, one worked layout in all three toolchains, confirmed from `--mapfile`
|
|
667
|
+
- [release-disk.md](release-disk.md) — putting the built PRG on a bootable D64 with c1541, proving it boots by autostarting the image headless, and a Makefile target that does both
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Minimal sources that provoke the messages in the "Reading the errors" table of ../../cc65-reference.md; each is meant to fail, so none is in a buildable fence.
|