An emulator for the LeapFrog Didj (2008), a learning handheld running Linux on a LeapFrog LF1000 (ARM926) system-on-chip.
didjemu is not affiliated with LeapFrog Enterprises or VTech. "LeapFrog" and "Didj" are their trademarks and are used here only to say which console this emulates. The handheld in the icon is an illustration, not a Didj.
All 16 known Didj titles start, and all of them have been played: menus, story scenes and levels, with sound, music, movies and their learning minigames.
| Title | Developer | |
|---|---|---|
| JetPack Heroes (built-in game) | LeapFrog | intro movie, menus, levels |
| Sonic the Hedgehog | Realtime Associates | every zone; hidden debug, demo and gadget menus; micromods |
| Didji Racing: Tiki Tropics | Torus Games | intro movie, menus, minigames, 3D races to the finish |
| Star Wars: The Clone Wars | Realtime Associates | opening crawl, cutscenes, levels with quiz-locked shields |
| Star Wars: Jedi Trials | Asylum Entertainment | 3D levels with skinned characters |
| Nancy Drew: Mystery in the Hollywood Hills | Asylum Entertainment | 3D rooms, dialogue, notebook |
| High School Musical | Asylum Entertainment | save slots, dialogue, minigames |
| Nicktoons: Android Invasion | WayForward | cutscenes, levels, code puzzles |
| SpongeBob SquarePants: Fists of Foam | WayForward | story, fighting levels |
| Super Chicks | LeapFrog | intro movie, levels |
| Foster's Home for Imaginary Friends | LeapFrog | intro movie, minigames |
| Neopets: Quizara's Curse | Other Ocean | pet creation, world |
| Tinker Bell and the Lost Treasure | Other Ocean | levels |
| Wolverine and the X-Men | Virtuos | comic intro, fighting levels, spelling minigames |
| Indiana Jones and the Kingdom of the Crystal Skull | Virtuos | comic intro, levels |
| Hannah Montana | Virtuos | story over photo backgrounds, minigames |
It is a command-line program for now: the firmware and the cartridges have to be extracted to folders first (see below), and the options are flags. A window front end is the next step (see Roadmap).
The Didj runs ordinary Linux programs: each game is an ARM shared object (App.so) loaded
by the console's app manager, on top of uClibc, libstdc++, LeapFrog's Lightning game
libraries and the Brio system services. didjemu runs the real ARM code (the game, the
C and C++ libraries, Lightning, even the Brio font module with its FreeType) on
Unicorn, with its own ELF loader and about fifty Linux
system calls, and reimplements on the host only the layer that talks to the hardware: the
Brio services (audio, display layers, Theora video, buttons, events, threads, timers) and
the MagicEyes OpenGL ES 1.1 driver, on SDL2 and desktop OpenGL.
docs/DIDJ_PLATFORM.md documents the platform as far as it is known: cartridge and package formats, the software stack, the Brio object model, the catalogue of titles, and what each one needed.
This repository contains no firmware, game code or cartridge data, and never will. You need dumps of a console and cartridges you own.
| File | Size | CRC32 | SHA-1 | Notes |
|---|---|---|---|---|
DIDJ-0x000E0003-000001.lfp |
7,544,841 | 9637e359 |
ca0bd7ef041fee8607d493bc02223dc72d6168eb |
system firmware 1.35.2.4222: Linux root file system |
/Didj partition image |
226,437,120 | 39ab4c27 |
b5c829047dee1e0723a0e6da262ced7ea3719244 |
FAT16: Brio, Lightning, the home menu, fonts, the built-in game |
Cartridges are FAT32 images of 62,238,720 or 62,254,080 bytes, one folder per title inside,
named by a three-letter code. Each carries a packagefiles.md5 that tools/verify_md5.py
checks after extraction (Nicktoons and SpongeBob ship without one).
| Code | Title | CRC32 | SHA-1 |
|---|---|---|---|
POW |
JetPack Heroes (package POW.lfp) |
07b14916 |
4ee0d87a0df2afe985ca8763b10adee2f52586ab |
LNT |
Nicktoons: Android Invasion | b1f88e51 |
efd3f15ba85bbc9a9d81be48fd4e42c24844f113 |
NLG |
Super Chicks | 0add2830 |
167f631a649cafc74b2735c89d0642635a23ae3e |
SNC |
Sonic the Hedgehog | 9d79db25 |
72f151bbedb07f45e47f451c24e7b080e33e5742 |
NLR |
Didji Racing: Tiki Tropics | 7a85bacb |
ad56278b5bda9a21bc94a26d0bd392500c449bcc |
DRU |
Nancy Drew: Mystery in the Hollywood Hills | 2009b8be |
3ca80b324ef9d05ff996d0847a35ea3af5d63dfc |
JDI |
Star Wars: The Clone Wars | d34d8cc1 |
9b57b95a49bfe322f2aacfe1f50f0eaa04132948 |
FOF |
SpongeBob SquarePants: Fists of Foam | 02184117 |
2f892718805837d0fb305ec1d2344128f71c5dbe |
MAC |
Foster's Home for Imaginary Friends | e8fa478e |
73f186d2129cb43c259bf29ba04a955075233f87 |
IND |
Indiana Jones and the Kingdom of the Crystal Skull | 1cbf5643 |
18c8e91ed256e6727942e5736342d7b0a5e368e7 |
NEO |
Neopets: Quizara's Curse | 11ed9fb1 |
e54c4cfd259a7220e9ea81b453c79c505e2dcdc6 |
HAN |
Hannah Montana | b4e78665 |
58e0fe6a04f2621d3ffbb00aa1c334d3d1044326 |
HSM |
High School Musical | 95a633d8 |
8ce703ede5d8cd27db13b063acdcb0562e6387b5 |
SW2 |
Star Wars: Jedi Trials | 91d4c09e |
304a5204f361ad54868c22cfb9eccf65438631c1 |
WVN |
Wolverine and the X-Men | 633feb44 |
e4bcefbcb0c30e29f2786f9c851ff2d3079506e6 |
DFR |
Tinker Bell and the Lost Treasure | 9286453b |
cf8820d0d9601f768a0e12e5ae987951b38f27a4 |
didjemu looks for its data under a root folder (--root, default the current folder):
firmware/rootfs/ the Linux root file system, from the firmware package's erootfs.jffs2
firmware/os/ the contents of the /Didj partition image
fs/<ID>/<ID>/ a cartridge's contents (App.so, meta.inf, ...), one folder per title
userdata/ created by didjemu: saves, settings and anything the games write
- Root file system: unzip the
.lfp(it is a zip) and extractfirmware-LF_LF1000/erootfs.jffs2withpython tools/jffs2_extract.py erootfs.jffs2 firmware/rootfs(needspip install jefferson; symbolic links become small text files, which didjemu follows). /Didjpartition and cartridges: FAT images, e.g.7z x <image> -ofirmware/osand7z x SNC -ofs/SNC. JetPack Heroes is a package: unzipPOW.lfpintofs/POW/.
Nothing is ever written to the dumps: every write goes to the userdata/ overlay.
MSYS2 MinGW 64-bit with mingw-w64-x86_64-gcc, -cmake, -ninja, -unicorn, -SDL2,
-libvorbis and -libtheora:
cmake -S . -B build -G Ninja
cmake --build build
The build copies the runtime DLLs next to didjemu.exe, so it also runs from outside the
MSYS2 shell.
build/didjemu.exe fs/SNC --root .
The argument is the folder mounted as /Cart (the one holding the title's folder).
| Didj | PC |
|---|---|
| D-pad | arrow keys |
| A, B | Z, X |
| Left and right shoulder | A, S |
| Pause, Hint, Home | Enter, H, Esc |
| Brightness | B |
| F12: screenshot |
Frames are paced at the Didj's 60 Hz screen rate, whatever the monitor's refresh rate. The WayForward titles, ports of a Nintendo DS engine that ran as fast as the Didj could draw, are paced at 30 fps, their speed on a real console.
| Flag / variable | |
|---|---|
--root DIR |
where firmware/ is (default .) |
--userdata DIR |
another writable overlay (default <root>/userdata) |
--scale N |
window scale (default 3) |
DIDJ_FPS=N |
pacing rate; 0 runs unlimited (fast forward) |
--frames N |
quit after N frames |
--shot N file.png |
screenshot at frame N (repeatable) |
--press F:mask, --tap F:mask |
scripted input at frame F (button bits as in the Brio spec: up 1, down 2, right 4, left 8, A 10, B 20, ...; --tap releases 8 frames later) |
--trace-files, --trace-hle, --trace-blocks |
log file accesses (with the frame number), every HLE call, recent blocks on a crash |
--watch SYMBOL |
log the first calls of a guest function (mangled name, repeatable) |
DIDJ_WATCHDOG=1 |
when no frame is presented for 3 s, dump the registers and a backtrace (finds freezes) |
DIDJ_STATS=1 |
the most called HLE functions every 5 s |
DIDJ_TRACE_AUDIO=1, DIDJ_TRACE_TEX=1 |
log sounds and texture uploads |
The Didj's downloadable extras: unzip the .lfp packages into userdata/Didj/Data/MDL/.
python tools/make_snc_remix_mdl.py fs/SNC/SNC userdata/Didj/Data/MDL userdata/Didj/Data/MDL/SNC_Backflip
builds the "MUSIC REMIXES" micromod that Sonic the Hedgehog has a menu for but that was never
released, from music already on the cartridge.
In order; the details are in TODO.md.
- A front end: open a cartridge image or package directly (no extraction), drop it on the window or pick it from a dialog, and a toolbar for the options that are flags today: pause and reset, window size and full screen, speed and fast forward, volume, screenshots, the debug switches. Key remapping and game controllers. A Linux build.
- Compatibility: longer play sessions of every title; the Brio services no title has needed yet (timers, message queues, MIDI).
- Performance: profile first; the heaviest scenes do not hold their frame rate yet.
- The Didj's own home menu, launching titles the way the console does.
- Other LeapFrog systems: the Leapster Explorer and its relatives are reported to share the Didj's software stack and to run its titles. How much they have in common will decide between one emulator for the family and one per console.
tools/ holds the scripts written along the way: verify_md5.py (check an extracted
cartridge), remote_fat_meta.py (read a cartridge's meta.inf from a remote FAT image over
HTTP range requests), symmap.sh and vtables.py (symbol and vtable maps of the firmware's
libraries), jffs2_extract.py, ogginfo.py, loopcheck.py (check an audio dump for loop
seams), snc_level_tour.sh and contact_sheet.py (visit every Sonic level and lay the
screenshots out), mkicon.py (the Windows icon). analysis/ keeps the symbol lists the
emulator's design started from.
To the people who preserved the Didj's cartridges, firmware and documentation on the Internet
Archive (didj-roms, LF-Firmware-Collection).
MIT. See LICENSE.
