Skip to content

MiSTerOrganize/MiSTer_J2ME

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

J2ME for MiSTer FPGA

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.

Installation

SSH into your MiSTer and run:

wget -O - https://raw.githubusercontent.com/MiSTerOrganize/MiSTer_J2ME/main/Scripts/Install_J2ME.sh | bash

Or download Install_J2ME.sh to /media/fat/Scripts/ and run it from the MiSTer Scripts menu.

To update later, re-run the install script.

Usage

  1. Copy J2ME .jar game files to /media/fat/games/J2ME/Midlets/
  2. SSH in and run: /media/fat/games/J2ME/J2ME
  3. Select a game from the list

Architecture

┌─────────────────────┐        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.

SD Card Layout

/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

Compatible Games

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

Controls

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

Building from Source

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/sdl12

The FreeJ2ME JARs are built from upstream using ant with JDK 8.

Credits

License

GPL-3.0, same as FreeJ2ME.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages