Play classic J2ME mobile phone games on your MiSTer FPGA.
Powered by FreeJ2ME, a free J2ME emulator by David Richardson and Saket Dandawate. This project provides a MiSTer-specific native display/input shim so it runs on MiSTer's ARM CPU with SDL 1.2 fbcon video output.
SSH into your MiSTer and run:
wget -O - https://raw.githubusercontent.com/MiSTerOrganize/MiSTer_J2ME/main/Scripts/Install_J2ME.sh | bashOr download Install_J2ME.sh to /media/fat/Scripts/ and run it from the MiSTer Scripts menu.
To update later, re-run the install script.
- Copy J2ME
.jargame files to/media/fat/games/J2ME/Midlets/ - SSH in and run:
/media/fat/games/J2ME/J2ME - Select a game from the list
┌─────────────────────┐ stdin (RGB24 frames) ┌──────────────────┐
│ Java JRE │ ──────────────────────────────────→ │ sdl_interface │
│ freej2me-sdl.jar │ │ (SDL 1.2 fbcon) │
│ │ ←────────────────────────────────── │ │
│ J2ME emulation │ stdout (input events) │ Display + Input │
└─────────────────────┘ └──────────────────┘
The Java process runs J2ME game emulation and pipes rendered frames to
the native sdl_interface binary, which handles MiSTer display and input.
The Java JAR is completely unmodified from upstream FreeJ2ME.
/media/fat/
├── games/
│ └── J2ME/
│ ├── J2ME ← Launcher (entry point)
│ ├── sdl_interface ← Native display/input shim
│ ├── freej2me-sdl.jar ← Java emulator
│ ├── jre/ ← Liberica JRE 11 ARM32
│ └── Midlets/ ← Your .jar game files
├── docs/
│ └── J2ME/
│ └── README.md
└── Scripts/
└── Install_J2ME.sh
J2ME games are .jar files designed for old Nokia, Sony Ericsson, and
Motorola feature phones. Common resolutions: 128×128, 176×220, 240×320.
The FreeJ2ME wiki has a compatibility list: https://github.com/hex007/freej2me/wiki
| MiSTer Button | J2ME Key |
|---|---|
| D-pad | Arrow keys / 2,4,6,8 |
| A | Fire / 5 |
| B | * (star) |
| X | # (pound) |
| Y | 0 |
| L | 1 |
| R | 3 |
| Start | Left soft |
| Select | Right soft |
The CI workflow builds automatically on push to main. To build manually
inside an arm32v7/debian:bullseye-slim Docker container:
# Build SDL 1.2.15 static
cd /tmp && wget https://www.libsdl.org/release/SDL-1.2.15.tar.gz
tar xzf SDL-1.2.15.tar.gz && cd SDL-1.2.15
./configure --host=arm-linux-gnueabihf \
--enable-static --disable-shared \
--enable-video-fbcon --disable-video-x11 \
--enable-audio --enable-alsa --disable-pulseaudio --disable-esd \
--prefix=/tmp/sdl12
make -j$(nproc) && make install
# Build sdl_interface
cd /path/to/repo/src
make SDL12_PREFIX=/tmp/sdl12The FreeJ2ME JARs are built from upstream using ant with JDK 8.
- FreeJ2ME: David Richardson, Saket Dandawate — https://github.com/hex007/freej2me
- MiSTer port: SDL 1.2 fbcon rewrite of Anbu (sdl_interface)
- MiSTer FPGA: https://github.com/MiSTer-devel
GPL-3.0, same as FreeJ2ME.