Build floors, a lobby, offices, condos, fast food, stairs and elevators in
an 80-column, 64-floor tower that scrolls. People travel as groups over
elevators and stairs (changing shafts when needed); elevators sweep up and
down; waiting crowds show at the doors and stress tenants into moving out.
Offices pay rent, condos sell, stars from population allow taller towers.
Multicolor character graphics in VIC bank 3 under the Kernal, a one-byte
per cell map of tile pairs, raster splits for a time-of-day sky, and an own
1351 reader read twice a frame with adjustable speed. Game speeds 1-8.
The self-test checks building and routing at startup; `c64 test` also runs
a full working day in a sample tower.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wireframe cube on an 80x50 grid built from the 16 quarter-block PETSCII
characters, with an assembly Bresenham plotter that merges pixels into
shared cells. 256 perspective frames are precomputed by tools/gen_cube.py.
Two screens in VIC bank 2 are flipped in the border, paced by a frame-
counting raster IRQ, at a steady 25 fps (PAL). The self-test checks the
plotter, the per-image cycle budget and that no image is held too long.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Capture vice.log and redirected stdout/stderr, record the emulator exit
code in result.json, and report launch failures and early exits clearly.
Pass -AfterJiffies to the monitor in hex. Add a native C128 case to the
regression suite and document the 40-column-only text check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bases every 256 columns (flat ground, water tower, H pad); the game starts
on one and the tank refills only when landed on a pad. The status bar shows
the direction and distance to the nearest base. Terrain tables move to
$6000/$7000 and $A800 (BASIC ROM banked out) to make room. Enemy spawns are
sparser (SPAWN_GAP 70, at most 4 at once).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cc65 C game logic over a ca65 engine (PAL):
- three-layer parallax (clouds, mountains, hills) with per-band $D016
splits; band shifts and sub-pixel layer stepping in scroll.s
- one raster IRQ scheduler (mux.s) driving the band splits and a sprite
multiplexer: 8 hazards + water spray on hardware sprites 3-7
- hazards (birds, balloons, jets) and tree fires in hazards.s; spray
water to put fires out, tank refills on landing, burnt trees persist
- terrain from height maps built at startup; columns built ahead and
background jobs scheduled by raster budget
- tools/gen_gfx.py generates all sprites and tiles (src/gfx.h, gfx.inc)
The self-test checks terrain, scrolling, the multiplexer and fire logic,
then flies 1000 demo frames, failing on any late frame, missed raster
split or scroll position jump.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Examples:
- The four .asm examples used generic period syntax no installed assembler
accepts. They are now ca65 with BASIC stubs, and pass c64 test.
- bitmap-demo: SET_PIXEL clobbered the loop counter, colors went to $0400
while $D018 pointed at $8400, the clear missed 64 bytes, and ORA under
BASIC ROM copied ROM bytes into the bitmap. It now draws 200 clean pixels.
- kernal-io: GETIN clobbers X; the line index now lives in memory. The
stray SETLFS is replaced by a real drive-status read.
- irq-handler: the raster IRQ exits via $EA81 instead of re-running the
Kernal handler (which double-counted the jiffy clock).
- sound-demo: NOTE% and WAVEFORM tokenized as NOT/FOR (SYNTAX error).
- disk-access: closing channel 15 closed the data files, the error path
left file 1 open, LOAD "$" replaced the running program, and the read
loop tested ST too early. It now writes, reads, lists, and renames.
Toolchain: BASIC builds sort lines like the C64 editor and warn about
variable names that contain keywords; BASIC errors report their line;
-Disk attaches an image; each target gets build/test/<name>/;
-refreshonbreak keeps screenshots in step with the dump; absolute paths
resolve. tools/regress.ps1 runs all 17 cases (all pass).
AGENTS.md is now a short entry point (workflow, rules, skill/reference/
project indexes); README describes the commands and layout.
newLang's regression suite gives the same 22 pass / 4 fail as on cfa64d1
(map-artifact baselines and a Get-FileHash lookup in prepare-disk.ps1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
skirmish-game, samples/kernal-os-skeleton, and samples/cc65-mouse-driver-demo
get c64project.json manifests with screen expectations; each rebuilds
byte-identical to its committed PRG and passes c64 test. A new cc65Target
manifest field ("none") keeps raw ASCII strings for projects that were
assembled without a target, which the kernal OS shell depends on.
.gitignore covers build/, object files, VICE logs, and personal Claude
settings; the committed .o files, vim128.map, and settings.local.json (which
held another machine's paths) are no longer tracked. .cmd/.bat keep CRLF.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new skill is the starting point for creating, building, testing, and
debugging programs: toolchain choice, c64project.json, the $D7FF result
protocol, test artifacts, live monitor use, PETSCII/charset traps, and the
VICE automation behaviors verified while building tools/.
The four c64os examples targeted a c64os.prg that is not in this repository.
examples/vice-debug-session.mon replaces them for any built program, and the
vice-emulator skill and reference now point at the c64 commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c64.cmd / tools/c64.ps1 give one entry point over cc65 and VICE:
doctor finds cl65/ca65/ld65/x64sc/x128/c1541/petcat (PATH, Program Files, WinGet)
new scaffolds projects/<name> from templates/{c,asm,basic}
build c64project.json or a single .c/.s/.bas -> build/*.prg, .lbl, .map, .d64
run autostarts in x64sc/x128; -Monitor opens the remote monitor with labels
test headless run that captures RAM, I/O, screen text, and a screenshot when
the program stores to $D7FF (0 = pass), reaches a label, or after N
jiffies; BASIC errors fail fast; prints the screen and PASS/FAIL
mon sends monitor commands to a running emulator and resumes it
lib/c64test.h and lib/c64test.inc wrap the $D7FF result protocol, which also
matches VICE's -debugcart. All three templates pass on C64; the C template
also passes as a C128 build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Skills under skills/ were only reachable by reading AGENTS.md. Paths in
AGENTS.md, README.md, newLang/AGENTS.md, the powerc skill, and the Power C
reverse-engineering notes now point at the new location; skills/README.md
remains as a pointer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The memory-map skill, the memory-map reference, and AGENTS.md disagreed with
Mapping the Commodore 64 on many zero-page entries (FAC1 placement, TXTPTR at
$7A, device bytes $99/$9A/$BA, SAL/EAL at $AC-$AF) and listed the $01
CHAREN/HIRAM/LORAM combinations incorrectly. Agents read these as facts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parser-test.prg and parser-test.map link emit.s and parser.s, which grew in
221e0c5, 5489ae6 and c487511 after the baseline was recorded, so the suite
failed on hashes alone while all 43 parser fixtures passed. Regenerated with
-UpdateBaseline over source, lexer and parser; the source and lexer hashes are
unchanged, and a fresh run of all three matches.
Generated programs kept their state in system zero page $C0-$FE, which on the
C128 is KERNAL and screen-editor state while CHROUT runs: the print runtime's
pointer and length sat on TCOLOR/RVS/QTSW ($F2-$F4), and the KERNAL IRQ clears
its index at $C0 (CAS1). HELLO.PRG printed "HELLO FROM NOVA1ELLO FROM NOVA128"
in reverse video, which 8f8cf00 had hidden by masking bit 7 in the check.
The ENTRY stub now masks IRQs, installs CR $0E (D129), points P0 at page $1A,
sets the frame base, calls CODE and START, then restores P0, CR and flags.
prgprint switches P0 back to $0000 only around each CHROUT, inlined to stay
position independent. The driver test no longer masks reverse video.
The larger runtime exposed an 8-bit overflow in the driver's CODE base
(ENTRY + START + PRINT now exceeds 255 bytes, which surfaced as DISK ERROR);
the driver now passes the 16-bit address it already computes.
Full regression: 25 of 26 suites pass; parser fails only on baseline hashes
that predate 221e0c5.
em_reset cleared only one row of em_meth_label: ldx #$FF / dex / bpl exits
after the first store because $FE is negative. Method label ids from the count
pass survived into the emitting pass after fl_init had freed every flow label,
so a later fl_alloc could hand the same id to another label. The loop now
clears all 256 rows, and labels are stored as id + 1 so 0 means unassigned.
hello-test.s never cleared em_on. Since 5489ae6 added emitter BSS, em_on lands
on RAM that VICE's power-on pattern leaves non-zero, so the statement emitter
ran without print vectors and reported E227 at end program. The fixture now
clears em_on before parse_file, as every emitter caller must.
harness.tests.ps1 embedded quotes in arguments for the call operator, which
PowerShell 7.3+ escapes into the path; it now passes plain arguments and runs
under both Windows PowerShell 5.1 and PowerShell 7.
Calls now stage their arguments and push them in reverse so arg0 lands at
FP+2, each body gets a patched frame prologue when frames are requested, and
return leaves the frame with a byte or word result preserved. A new args
fixture proves the parameter and result path in x128.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The story needs argument, return and interface-call emission, but the emitter
has no argument push, prologue or value return at all, and interface tables are
only placed after the code section. Document the exact gap and the decision
needed so the prerequisite work is not mistaken for this story.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The screen held the printed text with bit 7 set, so the converter reported
question marks and the literal search missed it; masking $80 makes the print
check read the VIC-II screen directly, and the driver suite passes through
the regression harness.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Emitted print calls pointed at a compiler trampoline and the literal at a
compiler buffer, so a built PRG could compile a print source but never show
it. Calls now use the em_pr_* cell values, a position-independent runtime is
copied into a PRINT section, an ENTRY stub runs the body, and the literal is
relocated into DATA.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The verifier proved the launcher path but never ran prepare-disk.ps1 itself,
so it now compares the injected n128c byte-for-byte with build/n128c.prg, and
the driver suite is part of the regression manifest.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The compiler had every phase and the PRG/MAP writer but no program on the
C128 that used them, so this adds the prompt, the planned code base, the
three container sections and the one-screen summary, plus a verifier that
drives the launcher through success, syntax failure and output collision
and runs the generated PRG.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Records the initialisation order the parser fixture establishes and the three
output paths output.s already provides, so the driver is wiring rather than new
file handling; no driver source has landed yet.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Analysis shows the type checker already models class/interface references, so
the work is emitter-side: four-byte slots, member transfers and if_call sites.
E04-S07 becomes a dependency because argument push/discard is its work.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
E07-S05 specifies the on-machine n128c driver that prepare-disk and the
compiler launcher already expect; E06-S07 specifies emitting interface
conversions, storage and calls from source. E07-S04 now depends on both, so the
walkthrough cannot be claimed before them.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Suites run from a manifest into fresh build directories with time limits,
captured logs, JSON results and SHA-256 comparisons; source, lexer and parser
artifacts are pinned, and self-tests cover timeout, failure signature and
changed-artifact detection.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The editor launcher now copies the Vim disk, injects vim128.prg into the copy,
and autostarts that disk copy in x128 80-column mode; host-loaded editor
sessions reported success without writing to the image.
E07-S03 adds a C128 tokenizer fixture and a two-session test that creates a
source in Vim, reopens it, and tokenizes the disk file without host conversion.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
E06-S06 routes deletion through a fat reference to obj_delete behind the heap's
always-on validation, so a stale value is refused with IF_ERR_FREED instead of
reading a freed destructor, and adds the objects.n8 parser fixture.
E07-S02 shares one launcher implementation that locks the writable image and
waits for the emulator exit and image flush, with x64sc for the editor and x128
for the compiler.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
iface_slot reads the declaration slot assign_slots recorded, so a call site
emits an offset the class table actually has and refuses a method the interface
does not declare. The x128 fixture proves one call site reaching two classes,
one object reaching two interface tables, a nested call with a one-byte result,
and byte/word arguments returning a word with the frame stack restored, while
self stays the underlying object.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
it_find selects the table a class emitted for an interface, refusing a pair the
class does not implement, and if_assign, if_arg_push, if_elem_store, and
if_elem_load give assignment, argument passing, field, and array storage one
API that keeps all four value bytes. Two x128 fixtures prove the class and null
conversions, verbatim copies, array stride, argument layout, and the result
area, while the semantic suite still rejects an invalid conversion.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Classes now build one table per implemented interface, in implements order with
one two-byte entry per interface slot, and a failed class rolls back so a
missing method address is refused instead of dispatching to zero. The MAP gains
one TABLE record per table, and the x128 fixture checks table contents, distinct
per-class tables, both rollback paths, and the exact MAP text.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Give interface calls one audited entry point that resolves the slot, refuses
null/table/entry/stack faults before executing anything, and returns through a
single synthetic address so nested and recursive calls unwind.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Freeze the four-byte fat reference, canonical null, slot/table layout,
and the IF_RESULT return area so interface dispatch and table emission can
build on one documented contract.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Lets pass 2 resolve absolute flow targets against a final CODE base and verifies a source program through deterministic PRG/MAP output and a real x128 run. Count-mode sizing, method/class MAP records, and unresolved-reference diagnostics remain in-progress.
Adds control flow, field access, forward self calls, method/program entry tracking, and E227 emission-failure reporting. Print vectors now live in safe zero-page cells to avoid the 6502 indirect-JMP page bug.
Statement emission now runs from parser pass 2: assignment, byte + and -, and
print reach codegen.s through emit.s, and the statements fixture executes the
emitted bytes in x128. Restoring the parser trace fixture's length arithmetic
(it emitted between the two halves of the subtraction, which clears carry)
brings the 41-fixture parser verification back to green after emit.s joined
the link.
Also check in the vim clone's improved C128 build and the Power C
reverse-engineering notes and tools.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The git host rejects its notification row when a commit message contains the
robot emoji, so every push with the emoji footer logged a server error even
though the ref updated.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Generated methods can now store and load fields through a zero-page receiver,
pass self to direct JSR calls, and keep byte or word results across argument
cleanup. The backlog gains the parser-to-codegen and pass-3 address assignment
stories the next backend work needs.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Generated programs now have control-flow emission, text and fault output, a
free-list heap, class descriptors, and object construction/deletion. Each
story lands with an x128 fixture and verifier so the runtime stays proven
before the parser drives code generation.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Single-file conio-based editor (vim128.c) that runs on the 40 or 80 column
screen, with incremental redraw and 2 MHz mode in 80 column mode.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Emit bounded documented instructions for scalar assignments, word and integer
arithmetic, comparisons, and short-circuit booleans, with checked forward
branch fixups. Add multiply and signed/unsigned divide helpers with a stable
divide-by-zero result, plus a reviewed golden byte stream and disassembly.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Implement transactional frame entry/leave, right-to-left arguments, one- and
two-byte returns, and guards for both the software stack and the 6502 hardware
stack. Add a recursive x128 ABI fixture covering bounded success and overflow
unwind.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Emit a BASIC-stub PRG with ordered sections and a MAP entry/section table,
refuse existing output names, and scratch partial files on failure. Include
a runnable startup that reports through the test mailbox.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Number interface methods in source order and check each class against every
implemented interface, reporting missing, private, mismatched, conflicting,
and non-interface implementations at the class declaration.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
Compute sizes and offsets after the declaration pass so forward references
have a kind, report E096 for instances over 65535 bytes, and record the
layout in the parser harness so declaration order is fixture-checked.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
types.s gives every expression a type and applies the spec 3.4/8
conversions, operator table, constant folding and diagnostic spellings.
parser.s records implements lists and init rows in pass 1, carries types
through member chains, groups, calls and indexing in pass 2, and checks
assignments, arguments, returns, conditions, for, print, delete and member
access. A method that declares a result must end in return; a missing one
is E150 at end, and a program return value is E151.
Three older parser fixtures gain true diagnostics. The lexer's host
reference formatter now spells bytes such as {0D} correctly, and the demo
tolerates a missing ERR file.
Verified in x128: 37 parser fixtures, 10 lexer fixtures, the 67-entry
diagnostic catalog, and the Vim-to-N8CHECK demo (good.n8 clean, bad.n8's
four diagnostics).
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
parse_statement parses every spec 7 form (assignment, call, if/else,
while, for/to/step, return, print, delete) and requires the line to end
after it. Expressions use precedence climbing over spec 8's levels: binary
operators left associative, unary not and - nesting rightwards, postfix
member access, calls, and indexing tightest. A syntax error is reported in
pass 1, unwinds to the statement, and skips the line; E03-S02's name,
member, and access checks now run from the parser in pass 2, replacing the
token scan. Expression nesting is bounded at 16 levels (E225).
Verified in x128: 31 fixtures, including the two statement fixtures that
were pending since E03-S01, a postfix trace golden for precedence and
associativity (both mutations caught), every statement form, and 15
independent syntax errors with recovery. Lowest stack pointer $A7. New
diagnostics E038-E042 and E225. The demo passes; its Vim typing is slowed
to 200 ms per key after one doubled keystroke.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/demo-write-check.ps1 types each demo program into the Vim clone
on x64sc (fresh copy of vim/work.d81), confirms the saved SEQ file matches
its ASCII mirror, then runs demo/n8check.s on x128: a DEMO driver (not
N128C) that asks for a file name and runs the current front end (source
reader, lexer, names, parser) with on-screen diagnostics and NAME.ERR.
good.n8 checks clean; bad.n8 reports its four intended errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>