Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ changing that game.
[platform/README.md](platform/README.md) (the bootloader's README lists
its own). Two things to know:
- `platform/board` is what the *next* board package release will contain.
Builds use the installed package for the core (0.2.4, or 0.3.0-local
when a staged build is installed), so an edit to the core, variant,
Builds use the installed package for the core (0.3.0, or a
`-local` version when a staged build is installed), so an edit to the core, variant,
`platform.txt` or `boards.txt` has no effect on a build until it is
released, staged and installed, or the installed copy is patched.
- The three libraries in `platform/board/arduino/CHGame/libraries/` are
Expand Down Expand Up @@ -160,22 +160,22 @@ pip install -e .[sim] # the tools (Pillow, pyserial, numpy) and the `chgame
Manager), then `pip install -e .[sim]` in the repository root.

**Notes:**
- **The Boards Manager URL** above is this repository's. Until 0.3.0, the
first release cut from here, is published, 0.2.4 is still served from
`https://github.com/bateske/CH32SerialBoot/releases/latest/download/package_chgame_index.json`
(use that URL and `CHGame:ch32v@0.2.4` meanwhile). The URL is given here,
in the README and in `platform/README.md`: change the three together.
To install 0.3.0 before it is published: `python tools/release/stage.py`
builds it as `0.3.0-local` and tests it as a new user, and
- **The Boards Manager URL** above is this repository's; 0.3.0
(2026-10-07) is the first release from here, with every game as one
cart, `CHGame-Casino-0.3.0.chgame`, and its SD card's zip beside it. The
URL is given here, in the README and in `platform/README.md`: change the
three together. To install the next version before it is published:
`python tools/release/stage.py` builds it as `<version>-local` and tests
it as a new user, and
`python tools/release/serve.py` serves it to Boards Manager at
`http://localhost:8765/package_chgame_index.json`
([platform/board/docs/trying-a-release.md](platform/board/docs/trying-a-release.md)).
- The board package brings its own RISC-V GCC 8.2 and the `chgame-upload`
tool, so nothing else is needed for device builds.
- **Linux:** the installed core 0.2.4's `ch32yyxx.h` includes
- **Linux:** core 0.2.4's `ch32yyxx.h` includes
`core_riscv_cH32yyxx.h` with a capital H, which only resolves on
case-insensitive file systems. It is fixed in `platform/board` (ships with
0.3.0); for 0.2.4:
case-insensitive file systems. Fixed in 0.3.0; if 0.2.4 is still
installed:
`ln -s core_riscv_ch32yyxx.h ~/.arduino15/packages/CHGame/hardware/ch32v/0.2.4/cores/arduino/ch32/lib/core_riscv_cH32yyxx.h`.
- **The libraries need no install.** `chgame build` compiles with
`--library` for CHGfx, CHGame and CHSd from
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ arduino-cli core update-index
arduino-cli core install CHGame:ch32v
```

(Until 0.3.0 is published, 0.2.4 is still served from
`https://github.com/bateske/CH32SerialBoot/releases/latest/download/package_chgame_index.json`,
without the libraries, games and menu bootloader. To try 0.3.0 now:
[trying-a-release.md](platform/board/docs/trying-a-release.md).)
The same release, [v0.3.0](https://github.com/bateske/CHGame/releases/tag/v0.3.0),
carries every game and app as one cart, `CHGame-Casino-0.3.0.chgame`
([spec/chgame.md](spec/chgame.md)), and that cart's SD card as a zip.
(Boards Manager URLs from before 0.3.0, the CH32SerialBoot repository's,
offer 0.2.4 only.)

**Then, in the IDE:** *Tools > Board > CHGame Boards > CHGame Rev0*. The games are under *File >
Examples > CHGame > Games*; set *Tools > USB* to **Upload only** for them
Expand Down Expand Up @@ -277,8 +278,7 @@ chgame cart deploy out/CHGame-Casino.chgame --card E:\ # onto a mounted card
### The board package: `platform/board/`

The Arduino core for the board: package `CHGame`, architecture `ch32v`,
version **0.3.0** (built and tested, not yet published; 0.2.4 is the one
installed today). It is a fork of the WCH CH32 Arduino core. It adds the
version **0.3.0** (released 2026-10-07). It is a fork of the WCH CH32 Arduino core. It adds the
CHGame variant (pin names such as `PIN_BTN_A` and `PIN_SD_CS`), the USB CDC
serial port, the app linker script (the sketch starts at 0x3000, above the
12 KB bootloader), and the `chgame-upload` tool, which uploads over USB in
Expand Down
20 changes: 9 additions & 11 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This page records what is in place and what each step involved.

| | Where | State |
|---|---|---|
| Arduino core, variant, linker scripts, Tools menus | `platform/board/arduino/CHGame` | 0.3.0, built and tested, not yet published (0.2.4 is the published one) |
| Arduino core, variant, linker scripts, Tools menus | `platform/board/arduino/CHGame` | 0.3.0, released 2026-10-07 |
| Bootloader with the SD game menu | `platform/bootloader` | menu v2 (2026-10-03), Rainbow and Static (White until that evening, when colour 15 became the picture's magenta as painted; that build has not run on a board): the PC suite, and installed and checked on a board the same day (`test/hil/RESULTS-2026-10-03.md`; the first menu on 2026-10-01) |
| The visual menu: the same bootloader, one picture at a time, no text ([visual-menu.md](visual-menu.md)) | `platform/bootloader` (`--ui=visual`), `tools/artkit`, each example's `tools/cart.py` | 2026-10-03: Rainbow and Static, in Burn Bootloader; the PC suite passes on test cards and the real casino card (which is now in genre folders, with box art for all 22 programs, repainted on 2026-10-04 with the menu's own pictures: [cover-art.md](cover-art.md)). Not yet run on a board (`platform/bootloader/HARDWARE.md`, "The visual menu") |
| The `.chgame` format and the SD card's layout | `spec/`, `tools/chcart` | version 1 and layout 2 (with the visual menu's pictures: `menu.cover`, `menu.about`, folder covers, `cartImage` in each CHG file); reference implementation, 24 unit tests, 27 conformance fixtures; the repository's games and release use it |
Expand All @@ -54,20 +54,18 @@ builds the uploader for the five hosts, the platform archive and the Boards
Manager index, and publishes them with `gh`
(`platform/board/docs/building.md`). `python tools/release/release.py
--dry-run` makes the whole set in `out/dist/`. `platform.txt` says 0.3.0
and the changelog has its section, headed "(not yet released)".
and the changelog has its section.

Also done the same day: `stage.py` builds the release as `0.3.0-local` with
localhost URLs, `serve.py` serves it to the Arduino IDE, and
`acceptance.py` is the new-user test, which `release.py` now runs before it
publishes anything; it also packs the release's SD card zip. What is left
is the release itself: date the changelog heading, run it.

- The package index then lives at
`https://github.com/bateske/CHGame/releases/latest/download/package_chgame_index.json`.
- Every place that gives the old URL changes with it: the root README's
*Installing* section, `CLAUDE.md`, `platform/README.md` and
`platform/board/arduino/CHGame/libraries/CHGame/examples/Apps/CHSDtoUSB/README.md`. The games' READMEs link to the root
README instead of repeating it.
publishes anything; it also packs the release's SD card zip. **0.3.0 was
released on 2026-10-07** (`v0.3.0`, with the casino cart and its SD card
zip). What is left:

- (Done) The package index lives at
`https://github.com/bateske/CHGame/releases/latest/download/package_chgame_index.json`,
and the README, `CLAUDE.md` and `platform/README.md` give that URL only.
- Decide how people on the old URL find the new one. An index is not
redirected by itself; a last release on the old URL that says so is one
way.
Expand Down
15 changes: 7 additions & 8 deletions platform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ here. The table's "Came from" column is history, not something to sync with.

| Folder | What | Version | Came from | Licence |
|---|---|---|---|---|
| `board/arduino/CHGame/` | The CHGame Arduino board package: core, variant, linker scripts, bootloader binary, `boards.txt` / `platform.txt` | 0.3.0 (not yet published; 0.2.4 is) | CH32SerialBoot tag `v0.2.4` (5de3006), folder `arduino/CHGame` | MIT (`board/LICENSE`, `board/THIRD-PARTY.md`) |
| `board/arduino/CHGame/` | The CHGame Arduino board package: core, variant, linker scripts, bootloader binary, `boards.txt` / `platform.txt` | 0.3.0 (released 2026-10-07) | CH32SerialBoot tag `v0.2.4` (5de3006), folder `arduino/CHGame` | MIT (`board/LICENSE`, `board/THIRD-PARTY.md`) |
| `board/docs/` | The board's docs: hardware pin map, flash/RAM map, boot flow, upload protocol, recovery, CH32X035 gotchas, building the bootloader | 0.2.4 | same tag, folder `docs` | MIT |
| `board/arduino/CHGame/libraries/CHGame/` | The CHGame library: `CHGame.h`, the one include of a sketch (buttons, pacing, palette, drawing, sound, saving, the debug protocol) | 0.1.0 | built here (2026-10-02) from the code the twenty games shared | Apache-2.0 (`LICENSE`, `NOTICE`) |
| `board/arduino/CHGame/libraries/CHGfx/` | The graphics library | 1.3.1 | CHGfx tag `1.3.0` (838bbb0) | MIT (+ font notices in its `LICENSE`) |
Expand Down Expand Up @@ -44,11 +44,10 @@ arduino-cli core update-index
arduino-cli core install CHGame:ch32v
```

Until 0.3.0, the first release cut from this repository, is published, 0.2.4
is still served from
`https://github.com/bateske/CH32SerialBoot/releases/latest/download/package_chgame_index.json`
(install `CHGame:ch32v@0.2.4` from there meanwhile, or stage 0.3.0 and
install it from this machine: [board/docs/trying-a-release.md](board/docs/trying-a-release.md)).
0.3.0 (2026-10-07) is the first release cut from this repository. The
CH32SerialBoot repository's URL offers 0.2.4 only. To try the next version
before it is published, stage it and install it from this machine:
[board/docs/trying-a-release.md](board/docs/trying-a-release.md).

**What the copy here is:**
- the source of the next release. A change made here does not reach a build
Expand All @@ -73,7 +72,7 @@ install it from this machine: [board/docs/trying-a-release.md](board/docs/trying
behaviour and memory report are described in
[../README.md](../README.md) and [../CLAUDE.md](../CLAUDE.md).

**Fixed here, not yet released:**
**Fixed here, released in 0.3.0:**
- **Linux builds failed.** `cores/arduino/ch32/lib/ch32yyxx.h` included
`core_riscv_cH32yyxx.h`; the file is `core_riscv_ch32yyxx.h`, so it only
resolved on case-insensitive file systems (Windows, default macOS). Fixed
Expand All @@ -83,7 +82,7 @@ install it from this machine: [board/docs/trying-a-release.md](board/docs/trying
0x2000 (`link_chgame_app.ld`, `chgame_map.h`), and one in `boards.txt`
naming a `tools/gen_ld.py` that does not exist (2026-10-02).

**Changed here, not yet released** (2026-10-02; all 20 games built from the
**Changed here, released in 0.3.0** (2026-10-02; all 20 games built from the
staged package, sizes unchanged):
- **Smallest + LTO is the default** *Optimize* option. FQBNs without `opt=`
now build with `-flto`; with plain `-Os` the larger games do not fit.
Expand Down
20 changes: 10 additions & 10 deletions tools/release/chgame_upload_tool.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@
"host": "x86_64-mingw32",
"url": "https://github.com/bateske/CHGame/releases/download/v0.3.0/chgame-upload-0.2.0-x86_64-mingw32.tar.bz2",
"archiveFileName": "chgame-upload-0.2.0-x86_64-mingw32.tar.bz2",
"checksum": "SHA-256:ab8a3c080fb8a7fae448e423fce175dbedc1d1b8abae81e794ff3573ea811d4e",
"size": "1140238"
"checksum": "SHA-256:dce1723df37d74c60cdac9024fd2997b952fab39b462fc388cd8215ea6fae129",
"size": "1142265"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/bateske/CHGame/releases/download/v0.3.0/chgame-upload-0.2.0-x86_64-pc-linux-gnu.tar.bz2",
"archiveFileName": "chgame-upload-0.2.0-x86_64-pc-linux-gnu.tar.bz2",
"checksum": "SHA-256:5e1f72d3d761a8620b5d5fc8065642a1772ec4d3970a7a0b46bef3d946f6fb91",
"size": "1051798"
"checksum": "SHA-256:19b5fc39aefde57ec98e92ac88940a5713436952780369115ca1c080a722ac78",
"size": "1055004"
},
{
"host": "aarch64-linux-gnu",
"url": "https://github.com/bateske/CHGame/releases/download/v0.3.0/chgame-upload-0.2.0-aarch64-linux-gnu.tar.bz2",
"archiveFileName": "chgame-upload-0.2.0-aarch64-linux-gnu.tar.bz2",
"checksum": "SHA-256:859a97aeef42049dd6e2028e99143fc540963ffa74bdf9dc043d5af01dd27fc4",
"size": "937633"
"checksum": "SHA-256:24d58a70d484a51ff7cd842d92753b7453faa831a548b685a9499a2b4e00757d",
"size": "939900"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/bateske/CHGame/releases/download/v0.3.0/chgame-upload-0.2.0-x86_64-apple-darwin.tar.bz2",
"archiveFileName": "chgame-upload-0.2.0-x86_64-apple-darwin.tar.bz2",
"checksum": "SHA-256:f0262bd43e4d5775fba87ca99eda8253ef0e5225b91e5386cac8e76db75e4721",
"size": "1035361"
"checksum": "SHA-256:f736014da70fa6a4718620d0c0239858a942c71a6185c6f356d6a3d5f91db835",
"size": "1037699"
},
{
"host": "arm64-apple-darwin",
"url": "https://github.com/bateske/CHGame/releases/download/v0.3.0/chgame-upload-0.2.0-arm64-apple-darwin.tar.bz2",
"archiveFileName": "chgame-upload-0.2.0-arm64-apple-darwin.tar.bz2",
"checksum": "SHA-256:4ea53d197bc0ad0f22aa2c8bf96183582cad9759f0a5bf73b8658b742943da12",
"size": "943335"
"checksum": "SHA-256:4a7ac7f4aeb8001af5710e2834d082c19ca7fff01be855d888f4452be6148a4a",
"size": "945652"
}
]
}