152 Commits
Author SHA1 Message Date
Stefan Wessels 500afb3e89 Docs: list the Amiga 500 port.
The public lists still stopped at the MEGA65. README, the recipe index, the seed table, the journal and the constraint notes now name the A500.
2026-10-12 21:31:08 -07:00
Stefan Wessels af291dcccf Add an Amiga 500 port for Kickstart 1.3
Own startup and a chunky frame flipped onto bitplanes, booted under FS-UAE with the cursor keys left for the menu.
2026-10-12 20:44:55 -07:00
Stefan Wessels 72e6e7f01b Measure A3010 search performance against native MEGA65 2026-10-12 10:37:42 -07:00
Stefan Wessels fd7bca9fa1 Add native MEGA65 port and measured search benchmark 2026-10-12 10:27:29 -07:00
Stefan Wessels 4de42f63f1 Add ArchieSDK Acorn Archimedes chess port 2026-10-10 01:16:38 -07:00
Stefan Wessels 401f1a87ca Add an Agon Light port.
Standalone /bin/chess.bin via agondev, C64 320x200 layout on the VDP.
2026-09-18 15:34:09 -07:00
Stefan Wessels a1399314c2 Add a Color Computer 3 port.
CMOC / GIME 320x200x16, C64 layout, Disk BASIC .bin and RS-DOS .dsk.
Quit restores Super Extended BASIC at $8000 and cold-starts.
2026-09-11 00:53:18 -07:00
Stefan Wessels 7a740f5852 Add a TI-99/4A port.
tms9900-gcc, 32K expansion.  The chess is EA5-shaped; a paged378 cart
copies it into RAM so MAME (and js99er) can boot it.  Spectrum 32-column
board, C64 colours.  make ti99 / make ti99 test.
2026-09-10 21:15:10 -07:00
Stefan Wessels 360d301520 a2m-v2 emulator is now a2m 2026-08-19 03:04:46 -07:00
Stefan WesselsandClaude Opus 5 c8954c2fe7 Build: let the environment set the emulator homes, and document the rest.
make/common.mk assigned VICE_HOME and the other emulator homes with :=,
and a makefile assignment beats the environment - so exporting VICE_HOME
was silently blanked and "make plus4 test" ran a bare xplus4 that is not
on PATH.  They are ?= now.  The value is a prefix, so it needs its
trailing slash.

A port name only selects a port, so give it an empty recipe rather than
let make print "Nothing to be done for `plus4'" in front of a test run
that is about to work perfectly well.

recipes/ gets the variables that are easy to lose and fail quietly:
RETRO68 for mac68k, PATH and ZCCCFG for spectrum - zcc compiles and
links the whole program without ZCCCFG and only the .sna step fails,
which reads like a broken install - and the emulator homes for running.
Also that Basilisk holding cc65-Chess.dsk open fails the mac68k build
at hformat with a lock error that looks like a broken toolchain.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 14:53:46 -07:00
Stefan WesselsandClaude Opus 5 ee98afb392 Ports: splash fixes, and the break a commented-out case left behind.
Mac 68k: the two kings were placed with unrelated absolute offsets and
the black one floated 23 pixels high.  Both text lines now centre on the
kings' own centre, measuring out gszAbout's trailing spaces - it doubles
as the Oric's menu scroller, and counting them pushed the visible text
half a pad left.  Text is "Macintosh 68k version, 2026.", since the
client is dated and not the engine, and "press a key." is gone because
a mouse click works too.

Plus/4: the splash claimed to be the Commodore 64 version, copied from
platC64.c when the port was added in 4e20bcf, October 2023.  The
shorter string needed centring, and plat_colorStringXY's own x had to
move with it or the colour would sit two columns off the text.

c64, c64.chr, plus4: the default: debug block is commented out but its
break was not, so it sat unreachable and warned on every build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 14:53:36 -07:00
Stefan WesselsandClaude Opus 5 facf2525cc Stop two ports spending shared bytes, and re-measure the maps.
board_ApplyMove's log-globals write (added with the ZX Spectrum) and
gGotoTile with its test in human_ProcessInput (added with the Mac 68k)
were unconditional code in src/ for features nine other ports do not
have.  137 bytes on every cc65 target - which cost the Atari a whole
DLIST page, on a machine neither of those compilers can even target.

The Spectrum asks the undo ring itself now.  gGotoTile stays, because a
mouse has to move a cursor that is a file static in human.c and no port
can reach it, but behind PLAT_CURSOR_JUMP, defined only in mac68k.mk.

Every 6502 target recovers 141 bytes (cx16 137 - its 65C02 codegen is
cheaper on the same source), so all of them end up slightly better than
before those two ports landed.  Atari DLIST is back at $7F00 with 42
bytes of padding.  AGENTS.md carries the re-measured numbers, the rule
that a port may not add unconditional bytes to src/, and the log
contract that made pre-filling the globals look like a fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 14:53:27 -07:00
Stefan WesselsandClaude Opus 5 a7cd16c0dc ZX Spectrum: take the move log from the undo ring, and finish the splash.
plat_AddToLogWin keeps its own scrollback and read gTile at append time,
which is why board_ApplyMove was made to fill the log globals for every
port.  undo_FindUndoLine(0) is the move just pushed at every point this
is reached - after a redo too, which ApplyMove never sees - so the port
asks for it itself.  The duplicate-line check went with it: it existed
to swallow the wrong line a redo used to produce off stale globals.

The splash was missing the second king entirely, and gszAbout is 36
visible characters on a 32-column display - putch clips at x>31 rather
than wrapping, so the year fell off the right edge and it read
"...S. Wessels,".  Two centred rows now, kings five rows either side.

Net 76 bytes smaller.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 14:53:17 -07:00
Stefan Wessels 6e5113ede0 Include mac68k in the default build when Retro68 is found. 2026-08-15 23:30:39 -07:00
Stefan Wessels 32da876f7e Docs: list the Macintosh 68k port.
The opening is no longer "1 MHz 8-bit machines."  Origin, then the faster
6502s, then the ports cc65 does not cover.  Seed table and platform count
match.
2026-08-15 23:20:46 -07:00
Stefan Wessels e0a5225f35 Add a Macintosh 68k port.
Retro68, System 7, 68000.  Gebhart pieces, Finder icon, mouse and keyboard
that hand off without fighting.  `make mac68k` — not a default port.
2026-08-15 23:10:34 -07:00
Stefan Wessels dac9c26b06 Docs: stop showing optspeed as the way to build.
optsize is the setting; the examples now match the uniformity rule.
2026-08-15 19:47:22 -07:00
Stefan Wessels 49f55c5734 Remove accidentaly added file 2026-08-15 19:40:18 -07:00
Stefan Wessels 5eea8550b0 Docs: the project is no longer cc65-only.
Name the ZX Spectrum, say the name is leftover, and point building at
make help / make list. Compilers stay out of the top-level readme.
2026-08-15 19:27:54 -07:00
Stefan Wessels 09c47cb03a Split the build into ports and toolchains.
A port is no longer a cl65 -t name. GNU Make dispatches from make/ports
and make/toolchains, so Spectrum (z88dk) and the host term build sit next
to the cc65 targets. Products land in build/<port>/; make help / make list
show the verbs and which compilers this machine has. make apple2 po is one
invocation.
2026-08-15 18:50:07 -07:00
Stefan Wessels 00deb14fda Add a ZX Spectrum port.
platSpectrum.c is a full plat.h: board, menus, B/A/D, and Think. Squares
are 3x2 characters on a 32-column display. SEARCH_ARENA is overridable so
a tighter machine can shrink the move list, and the log globals are written
when a move is applied so a smashed undo ring still shows the last ply.
2026-08-15 18:49:56 -07:00
Stefan Wessels f8d7430219 Remove rp6502 from defaault build
Since rp6502 requires a special version of cc65, it will not build
automatically with the other cc65 targtes
2026-08-14 03:49:47 -07:00
rumbledethumps c6a5869c63 add rp6502 2026-08-13 23:51:25 -07:00
Stefan Wessels 7f1ef435dd Fix build instructions V2.0 2026-08-13 14:25:43 -07:00
Stefan Wessels d02caab0a0 Apple II po disk image name fix 2026-08-13 14:15:34 -07:00
Stefan Wessels 075f6f98f4 Ports: playable UI fixes across the 8-bit clients.
Atari highlight XORs instead of filling, so A/D no longer erase the
piece; rank-1 B numbers stay inside the 192-row lookup; arrows work
without Opt/Cmd; black log lines invert like the Oric. Plus/4 copies
the charset with ROM paged in so text appears at all, and inverts
black's log the same way. c64.chr walks the undo stack for the log.
C64, Plus/4 and CX16 treat both STOP and ESC as backup. Search polls
M / RUN-STOP every 64 nodes so AI-vs-AI can be interrupted mid-think.

CX16 no longer wipes the log on every DrawBoard (undo was flashing
clear-then-redraw) and the menu ticker uses RDTIM — $A03B is the r39
clock and is frozen on R49. GetSeed uses the same call.

Free space remasured from a clean optsize link of all seven targets.
Atari still 874 below the framebuffer, 38 bytes of DLIST pad left.
Apple II 656 / 2024. optspeed still overflows both tight machines.
2026-08-13 14:11:19 -07:00
Stefan WesselsandClaude Opus 5 befc005793 Docs: say what level 1 is aimed at, and what its one ply costs
The ladder table gives level 1 a rating; it never said who that rating is
for.  State the target explicitly - beat a rank amateur, lose to a seasoned
beginner - and tie it to the mechanism, since the line falls exactly where
the second ply would be: at 400 nodes level 1 plays a one-ply move, so
quiescence keeps it from dropping pieces to a capture and it still mates in
one 55 of 60, while anything needing a quiet move to arrange, including a
mate in one against itself, is invisible.  Found by losing a game to a
human at this level and asking why.

Also records the one place the label overpromises, which is time rather
than strength: 400 nodes is the fastest setting and still 11 seconds a move
on a stock C64, and the budget cannot be cut because 300 draws won endings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 22:28:15 -07:00
Stefan Wessels 318c05a1d9 Docs: describe HEAD; fold closed portfolios into the log.
Product docs no longer narrate the journey. Search and evaluation
candidates that were measured and stopped live at the end of the
rework log. Emulator how-tos move from scratch/ to recipes/.
2026-08-12 21:52:05 -07:00
Stefan Wessels 9af82a752e F5: reject aspiration windows; Phase F closed empty
Window 50 around the previous iteration, full window on either failure.
Same-depth completed iterations match baseline move and score. Level 1
spends 22% more nodes; level 4 saves 10% and changes thirteen moves.
That is the PVS shape again, below the floor. Default off.
2026-08-12 17:17:44 -07:00
Stefan Wessels be397c161c F4: reject 16-bit move cache after host instrument
Probe may only promote a stored move found in the generated list.
32-, 64- and 128-entry tables all produce real cutoff-first hits and
no measurable node saving. No target code. RAM size is still open;
the instrument says do not spend it.
2026-08-12 17:13:44 -07:00
Stefan Wessels 5a8de66ec6 F3: reject compact piece-to-destination history
A 6x64 saturating table, cleared every search. Switch-off is exact. The
switch on saves 3.55% of L3 nodes and 2.49% at L4, and changes ten L4
moves. Ordering is already near-minimal. Default off.
2026-08-12 17:09:37 -07:00
Stefan Wessels ae54666a09 F2: reject previous-iteration root-score ordering
Rank every previously searched root move, not only the winner. Switch-off
is exact. The switch on spends nodes at levels 1-3, saves 0.24% at level
4, and changes nine L4 moves. Compiling it on takes an Atari display-list
page. Default off.
2026-08-12 17:06:21 -07:00
Stefan Wessels 02823b612a F1: reject previous-iteration full PV follow
Carry the last completed PV and try it first while the new search stays
on that line. Switch-off is exact. The switch on saves 1.36% of L4
nodes, spends 0.41% more at L3, and changes two L4 moves. Compiling it
on overflows Atari and Apple II. Default off.
2026-08-12 17:03:26 -07:00
Stefan Wessels 154ee420c7 Docs: remeasure free space; Apple II MAIN is now tightest
Relinked all seven targets. Apple II has 852 bytes in MAIN and 2,025 in
BSS. Atari still has 1,387 below the framebuffer. The other rows had
drifted and are brought current.
2026-08-12 16:50:03 -07:00
Stefan Wessels 58a79ad2d1 Atari: move the undo ring into upper RAM
The 1,024-byte persistent ring now lives at $AF00-$B2FF, in the hole
between the GR.8 screen and the 2K stack. Other targets are unchanged.
Framebuffer headroom is 1,387 bytes. Verified under Altirra and on the ATR.
2026-08-12 16:40:44 -07:00
Stefan Wessels 11d39afe42 E3: reject queen-before-minors — dose 16 short of +2σ
Doses 0 / −16 / −48 were declared first. The eval-time scan of the ten
home squares links on Atari and takes a display-list page; incremental
make/unmake does not link. Dose 16 is +1.95σ against a same-day
control that matches the published ladder. Dose 48 is worse. Defaults
off.
2026-08-12 16:19:03 -07:00
Stefan Wessels 97aa2f3f38 E2: existing values already at the constrained minimum
One fit of the shipping constant family on positions the engine actually
reaches. book.epd even/odd openings are train and locked val, pawn stays
100, tables keep their shape. The freeze is bishop 325; val mse is noise.
A null is done, so no gauntlet and no shipping change.
2026-08-12 15:55:13 -07:00
Stefan Wessels a3e74f7ed8 Docs: Sargon L4 confirmation after the Harder budget raise
22-13-29 (57.0%) at 18,000 nodes, 33 openings, no fifty-move draws.
Previous 15,000-node pairing was 22-27-15 (46.1%) with a weak Black
side; Black is now 11-4-17. Confirmation, not a regression.
2026-08-12 15:20:13 -07:00
Stefan Wessels 6b2f08a3f4 Docs: same-day 15k/60k control and measured C64 Phase D times
Harder's +20 Elo is against today's 15,000-node binary, not the historical
ladder. Very Hard 65,000 is a wash. Middlegame L4 is 48 minutes at 65k.
2026-08-12 11:43:22 -07:00
Stefan Wessels b74f9f00aa Docs: Phase D budgets, C64 L1/L2 times, Harder/Very Hard ladder
Record the 400/1,200/18,000/65,000 split, the 11.0s/39.7s C64 means, and
the L3/L4 Stockfish rows. Harder is a real granted-node gain; Very Hard
is noise. Sargon L4 confirmation still running.
2026-08-12 11:26:40 -07:00
Stefan Wessels 14bc3b2cd4 Phase D: spend B3+B4 on Harder and Very Hard nodes
Keep Very Easy and Easy at 400 and 1,200 so those menu levels get the
measured 17.2% back as wall time. Raise Harder 15,000 to 18,000 and
Very Hard 60,000 to 65,000, still inside 16 bits and off the 65,535
edge. Depth caps stay 3/4/5/6.

c64phased.c times old and new Harder/Very Hard budgets on fixed
opening, middlegame and endgame positions.
2026-08-12 11:10:45 -07:00
Stefan Wessels da38df214f Docs: point AGENTS.md at measured E portfolio status
Forward-work note now records B3+B4 as the only speed survivors and E1/E4/E5
as closed empty, with E2/E3 open via E6.
2026-08-12 10:25:25 -07:00
Stefan Wessels 24f9093523 Docs: record E portfolio results across engine notes
Update next-engine portfolio status and open order, engine appendix B,
measuring suite/mine_failures, next-search check-extension status,
Agents.md pointer, and strength.md E1 equal-time confirmation.
2026-08-12 10:25:12 -07:00
Stefan Wessels e29833d954 E6: failure-mining instrument and sample; close E portfolio note
Add mine_failures.py for first durable SF swings on our losses. Sample L3
gauntlet: queen moves lead. E2/E3 left open with that direction; E1/E4/E5
already rejected on measured gates.
2026-08-12 10:20:25 -07:00
Stefan Wessels 6ef438ae9c E5: reject check extension — hurts level-1 mates
One-ply extension when in check changes move order under fixed budgets,
drops mate-in-one at level 1 below the floor (11/12→10/12), and costs an
Atari display-list page. SEARCH_CHECK_EXT defaults off and compiles out.
2026-08-12 10:19:01 -07:00
Stefan Wessels 7a51ab788d E4: reject KBN drive for Atari size
Colour-aware corner drive converts at level 4's budget on the host but the
working C is hundreds of CODE bytes over Atari. Slim forms still overflow and
levels 1–3 stay at zero. Default EVAL_KBN_ON off; suite forces it for gates.
2026-08-12 10:16:25 -07:00
Stefan Wessels c7127b7dda E1: reject pawn structure for equal-time cost
Board-scan form fitted Atari (82 free when on) but host nodes are ~1.38x
dearer; equal-time self-play is 182-244-86 over 512. Equal nodes only
228-208-76. Default EVAL_PAWNSTRUCT_ON off and drop the bit from EVAL_ALL.
Native suite still forces the switch on so purpose tests stay live.
2026-08-12 10:07:55 -07:00
Stefan Wessels 6b49080c9a E1: size-conscious board-scan form for Atari
Incremental make/unmake file counts cost ~750 CODE bytes and pushed the
Atari past the framebuffer. A pawn-only board scan at eval time fits:
6502 ports use pawnstruct.s (~248 CODE, 23 BSS), host keeps the C
reference. Doses are powers of two (-8 doubled, -16 isolated).

Atari DLIST at $7E00, 82 bytes below the framebuffer; all seven optsize
targets link; native suite green.
2026-08-12 09:51:15 -07:00
Stefan Wessels acba885934 E1: incremental doubled/isolated pawn structure
Rebuild the Phase 4 pawn-structure signal as file counts updated on
make/unmake, with the aggregate score added in eval_Position rather than
folded into geEvalScore. Dual switch: EVAL_PAWNSTRUCT in geEvalTerms and
EVAL_PAWNSTRUCT_ON for on-target node pricing. Passed pawns stay separate.

Purpose tests cover doubled, isolated, promotion, capture and live switch;
the fuzzer checks file counts and the structure total after move/undo/redo.
2026-08-12 09:39:06 -07:00
Stefan Wessels 15a8d00082 Close Phase C after C4/C5 screens
Zero page is fully used ($1A) on every measured target; only Atari has spare
beyond the runtime block, so no common ZP placement is available. Piece lists
remain low priority given the Phase 20 profile and C3's blocked capture path.

Phase C ends with C1–C3 rejected on measurement and C4–C5 deferred. Shipping
is still the Phase B engine.
2026-08-12 01:51:29 -07:00