Skip to content
Merged
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
47 changes: 43 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ permissions:

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
PAGES_DOOM_IWAD: .tools/assets/freedoom-0.13.0.zip
PAGES_DOOM_CROM_FILE_BYTES: "2097152"

concurrency:
group: pages-${{ github.ref }}
Expand Down Expand Up @@ -85,6 +87,42 @@ jobs:
path: dist/asm-rom/*
if-no-files-found: error

pages-rom:
name: GitHub Pages Freedoom ROM
runs-on: ubuntu-24.04
if: github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install ngdevkit
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common curl zip imagemagick sox libsox-fmt-mp3 python3-pil python3-ruamel.yaml
sudo add-apt-repository -y ppa:dciabrin/ngdevkit
sudo apt-get update
sudo apt-get install -y ngdevkit ngdevkit-gngeo

- name: Download Freedoom IWAD
run: make "${PAGES_DOOM_IWAD}"

- name: Build web-safe Freedoom ROM
run: |
make cart bios \
TOOLS_PREFIX=/usr \
DOOM_IWAD="${PAGES_DOOM_IWAD}" \
DOOM_CROM_FILE_BYTES="${PAGES_DOOM_CROM_FILE_BYTES}"

- name: Collect Pages ROM artifacts
run: python3 tools/doomgeo_build.py package --out dist/pages-rom

- name: Upload Pages ROM
uses: actions/upload-artifact@v4
with:
name: doomgeo-aes-pages-rom
path: dist/pages-rom/*
if-no-files-found: error

helpers:
name: Standalone helpers (${{ matrix.os }})
strategy:
Expand Down Expand Up @@ -187,6 +225,7 @@ jobs:
runs-on: ubuntu-24.04
needs:
- rom
- pages-rom
- asm-rom
if: github.event_name != 'pull_request'
environment:
Expand All @@ -196,11 +235,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Download ROM artifact
- name: Download Pages ROM artifact
uses: actions/download-artifact@v4
with:
name: doomgeo-aes-rom
path: dist/rom
name: doomgeo-aes-pages-rom
path: dist/pages-rom

- name: Download ASM ROM artifact
uses: actions/download-artifact@v4
Expand All @@ -209,7 +248,7 @@ jobs:
path: dist/asm-rom

- name: Build Pages bundle
run: python3 tools/doomgeo_build.py pages --rom dist/rom/doomgeo-aes.zip --bios dist/rom/neogeo.zip --asm-rom dist/asm-rom/doomgeo-aes-asm.zip --out dist/pages
run: python3 tools/doomgeo_build.py pages --rom dist/pages-rom/doomgeo-aes.zip --bios dist/pages-rom/neogeo.zip --asm-rom dist/asm-rom/doomgeo-aes-asm.zip --out dist/pages

- name: Verify FBNeo web package CRCs
run: |
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ python3 tools/inspect_map_specials.py --map E1M2
```

You must provide your own Neo Geo BIOS for local emulation. The browser package
uses an FBNeo-compatible packaging path, but that does not rename the project:
`DoomGeo-AES` is the game name; `puzzledp` is only the private FBNeo driver/chip
identity used so the arcade core accepts the generated homebrew ROM zip.
uses a separate Freedoom-based ROM and an FBNeo-compatible packaging path, but
that does not rename the project: `DoomGeo-AES` is the game name; `puzzledp` is
only the private FBNeo driver/chip identity used so the arcade core accepts the
generated homebrew ROM zip.

## Documentation

Expand Down
20 changes: 14 additions & 6 deletions docs/build-packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Both are plain Python scripts under `tools/` and are packaged as standalone
Linux and Windows binaries by GitHub Actions.

There is also a GitHub Pages bundle generated by `doomgeo-build pages`. It
publishes the generated Neo Geo cartridge plus the null BIOS and loads them with
EmulatorJS's FBNeo WebAssembly/asm.js frontend, so the current ROM can be played
directly from the repository's Pages site. The same Pages bundle can expose the
standalone 68000 assembly ROM at `asm.html`.
publishes a web-safe generated Neo Geo cartridge plus the null BIOS and loads
them with EmulatorJS's FBNeo WebAssembly/asm.js frontend, so the current ROM can
be played directly from the repository's Pages site. The same Pages bundle can
expose the standalone 68000 assembly ROM at `asm.html`.

FBNeo is an arcade core and validates known romsets by filename, size, and CRC.
For the Pages bundle only, `doomgeo-build pages` writes FBNeo-compatible launch
Expand All @@ -23,6 +23,13 @@ the private FBNeo driver/chip compatibility identity. The raw build artifacts
under `build/rom/` are not rewritten this way; this compatibility package is
only for the browser player.

The deployed Pages ROM is built separately from the normal native artifact. CI
uses the redistributable Freedoom IWAD and `DOOM_CROM_FILE_BYTES=2097152` for
that job so the browser package does not embed proprietary Doom assets and still
matches the fixed C-ROM chip sizes expected by FBNeo's `puzzledp` driver. The
regular Linux, Windows, and local ROM artifacts are left on the normal build
path.

## Local Linux Build

The existing Makefile still expects ngdevkit under `.tools/ngdevkit-local/usr`
Expand Down Expand Up @@ -370,9 +377,10 @@ or system packages installed through apt/MSYS2.

## GitHub Actions

`.github/workflows/build.yml` has three responsibilities:
`.github/workflows/build.yml` has these responsibilities:

- Build and upload the Neo Geo ROM on `ubuntu-24.04`.
- Build and upload a separate Freedoom-based web-safe ROM for GitHub Pages.
- Build and upload a separate 68000 ASM Neo Geo ROM on `ubuntu-24.04`.
- Build and upload the Neo Geo ROM on Windows through MSYS2 UCRT64.
- Package `doomgeo-build` and `doomgeo-plan` as standalone binaries on Linux
Expand All @@ -382,7 +390,7 @@ or system packages installed through apt/MSYS2.
The Ubuntu ROM job uses the upstream ngdevkit PPA and passes `TOOLS_PREFIX=/usr`
so the CI machine does not need repo-local `.tools` state.

The Pages job consumes the ROM artifact and writes:
The Pages job consumes the Freedoom web ROM artifact and writes:

```text
dist/pages/index.html
Expand Down
2 changes: 2 additions & 0 deletions docs/release-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ the other only accompanies and tracks the plan.
- The Pages ROM zips are expected to be FBNeo-compatible launch packages with
`puzzledp` driver chip filenames, sizes, and CRCs internally while preserving
the generated homebrew data outside the final padding correction bytes.
- The Pages main ROM is expected to come from a separate Freedoom-based build
with 2 MiB C-ROM chips, not from the normal native/local ROM artifact.
- Repo-local installs are removable with `doomgeo-build uninstall`; `--all`
also removes cached WAD/package downloads under `.tools`.
- The installer decision is MSYS2 UCRT64 for native Windows builds, with WSL
Expand Down
15 changes: 15 additions & 0 deletions tools/doomgeo_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
"202-m1.m1": 0x9C0291EA,
"202-v1.v1": 0xDEBEB8FB,
}
FBNEO_PUZZLEDP_SIZE = {
"202-p1.p1": 0x80000,
"202-s1.s1": 0x20000,
"202-c1.c1": 0x200000,
"202-c2.c2": 0x200000,
"202-m1.m1": 0x20000,
"202-v1.v1": 0x80000,
}
FBNEO_NEOGEO_CRC = {
"sp-s3.sp1": 0x91B64BE3,
"sm1.sm1": 0x94416D67,
Expand Down Expand Up @@ -385,6 +393,13 @@ def build_fbneo_rom_zip(source_zip: Path, out_zip: Path) -> None:
data = archive.read(name)
except KeyError as exc:
raise BuildError(f"ROM entry missing for FBNeo package: {name}") from exc
expected_size = FBNEO_PUZZLEDP_SIZE[name]
if len(data) != expected_size:
raise BuildError(
f"ROM entry {name} is {len(data)} bytes, but the FBNeo puzzledp "
f"web driver expects {expected_size} bytes; rebuild the Pages ROM "
"with DOOM_CROM_FILE_BYTES=2097152"
)
entries[name] = force_crc32(data, desired_crc)
write_zip_entries(out_zip, entries)
print_step(f"wrote FBNeo-compatible ROM package to {out_zip}")
Expand Down
Loading