W4ME Station – 适用于 Java ME 手机的 WASM-4 运行时
W4ME Station – a WASM-4 runtime for Java ME phones

原始链接: https://github.com/mulfyx/w4me-station

**W4ME Station** 是一个运行时环境,允许未经修改的 WASM-4 WebAssembly 游戏包在 21 世纪 2000 年代中期的 Java ME (CLDC 1.1 / MIDP 2.0) 老式功能手机上运行。该项目提供了一个高度优化且轻量级的 JAR 文件(小于 300 KB),内置了 13 款游戏,并支持通过 HTTP、本地存储或 JSR-75 文件浏览功能安装额外的 .wasm 文件。 主要特性包括: * **广泛的兼容性:** 无需 JIT 即可在旧硬件上运行,利用基于 RMS 的持久化存储和固定宽度的 W4IR 缓存。 * **全面的 API:** 实现了用于图形、输入、音频和磁盘的 WASM-4 主机 API,支持手机键盘、触摸屏以及基于 MMAPI 的音频。 * **灵活的安装:** 提供“完整版”和“基础版”,以确保与缺少 FileConnection API 的设备兼容。 * **开发工具:** 使用基于 Linux 的工具链及 JDK 8 和 ProGuard 构建,确保类文件与 Java 1.3 保持兼容。 W4ME Station 是一个独立的 MIT 许可项目,与 WASM-4 官方维护者无关。它为将现代复古游戏带入早已淘汰的移动硬件提供了一种独特的方式。有关详细的安装、兼容性和源代码信息,请参阅该项目的文档。

W4ME Station 是一款新发布的运行时环境,它使 2000 年代中期的 Java ME (CLDC 1.1 / MIDP 2.0) 手机能够运行未经修改的 WASM-4 卡带。该项目由用户“sqshi”开发,包含一个 WebAssembly 解释器,并支持图形、音频、输入和持久化存储功能。 整个运行时环境打包了 13 个卡带,大小约为 275 KB 的 JAR 文件。开发者创建该项目的初衷是为了测试在内存极其受限的硬件上运行 WebAssembly 的可行性,目前正寻求社区对解释器性能、卡带兼容性以及在旧设备上运行情况的反馈。尽管该项目是一项令人印象深刻的技术成就,但初步的社区讨论指出,275 KB 的体积对于那个时代许多低端功能手机来说可能仍然过大。
相关文章

原文

Run WASM-4 games on Java ME phones.

W4ME Station brings unmodified WebAssembly cartridges to CLDC 1.1 / MIDP 2.0 devices, including feature phones from the mid 2000s.

CI Java ME: CLDC 1.1 / MIDP 2.0 Release 1.0.0 MIT License

W4ME Station running on a Nokia E71

Thirteen bundled cartridges ship in a 275 KB JAR. The runtime uses no JIT, and the bundled library needs no network connection. Both release variants stay below 300 KB.

SHA-256 checksums are stored beside the version 1.0.0 artifacts.

W4ME Station targets CLDC 1.1 / MIDP 2.0 devices. It is independent from and not endorsed by the WASM-4 maintainers.

Further .wasm files can be installed from the device.

Sokoban running on a Nokia E71 Wasm Wars running on a Nokia E71 Plasma Cube running on a Nokia E71

  • validated WebAssembly execution with a persistent fixed-width W4IR cache;
  • WASM-4 graphics, input, audio, disk, text, and tracing host APIs;
  • thirteen bundled cartridges plus HTTP(S), RMS, URL, and optional JSR-75 loading;
  • phone keys, keyboard controls, pointer input, and an on-screen touch pad;
  • per-cartridge persistent disk storage with checksummed RMS generations;
  • sampled MMAPI audio with streamed MIDI, playTone, and silent fallbacks;
  • global RMS-backed sound On/Off and master-volume controls;
  • deterministic host, KEmulator, and optional phoneME verification.

The release version is 1.0.0. The verified scope and remaining limitations are documented in Compatibility.

Development requires Linux with just, Podman, and Distrobox installed. The project toolchain contains JDK 8, ProGuard, KEmulator, WABT, and supporting utilities. Version-sensitive components are pinned by the container definition.

Java sources and classfiles remain pinned to Java 1.3.

Artifacts are written to dist/:

Artifact Purpose
w4me-station.jar / .jad full build with optional JSR-75 file browsing
w4me-station-base.jar / .jad build without JSR-75 classes

Both variants contain the same thirteen cartridges. The base build works on MIDP 2.0 devices that do not implement the optional FileConnection API.

Download one matching .jad/.jar pair from the table above and keep both files in the same directory. Use the full build on devices with JSR-75 FileConnection support; use the base build if the full build is rejected or the device lacks that optional API.

Open the .jad from the phone's application manager or file manager. If the device does not accept JAD installation, transfer and open the matching .jar directly. Installation details and troubleshooting are covered in Installation.

Input Player 1 Player 2
Movement Arrow or directional phone keys E, S, D, F
Button 1 X, Fire, or 5 Tab
Button 2 Z or 0 Q

Touchscreen devices display an on-screen directional pad and action buttons. The controls stay outside the 160×160 framebuffer whenever the screen is large enough.

Sound settings is available from the cartridge library and the in-game command menu. It contains Automatic/Compatible audio mode, a hard global Sound On/Off mute, and master volume when the backend supports it. Confirmed settings persist across MIDlet restarts.

The launcher includes the thirteen cartridges listed above, in that order.

Additional .wasm files can be installed from HTTP(S), entered as a file:// URL, or selected with the JSR-75 browser on supported devices. Installed cartridges are copied into RMS and can be relaunched without their original file or network source.

Cartridges are third-party works. Their authors, upstream sources, hashes, and licenses are listed in Third-party notices.

just test
just verify
just run

The stable commands are listed by just --list. Specialized KEmulator, phoneME, and profiling commands are described in Development. Generated logs, screenshots, and benchmark receipts are written under build/reports/.

W4ME Station source code is available under the MIT License. Bundled cartridges retain their own licenses and are not covered by the MIT License.

The optional local phoneME rig is GPL-2.0-only and is not distributed with the project. Its modified corresponding source is not public yet, so its binaries must remain local and ignored. See Performance.

联系我们 contact @ memedata.com