跳到正文
Gbatemp· koori·· 2 小时前AI 评分15

[发布] MoflexTool — 面向 Nintendo 3DS 的开源 MOFLEX 编码器/解码器

[Release] MoflexTool - Open-source MOFLEX encoder/decoder for Nintendo 3DS

AI 导读

韩国爱好者发布开源工具 MoflexTool,提供 Nintendo 3DS 游戏 MOFLEX 视频的编码、解码与替换功能。该工具已成功将《Digimon World Re Decode》一段约42秒过场动画重新编码替换,并在 Old Nintendo 3DS 上完整播放,项目基于 LGPL-2.1 许可开源。核心视频到真实硬件播放工作流对已测游戏

正文

Hi everyone,

I'm a Korean hobbyist who enjoys translating and modding games in my spare time.

While working on a Korean fan translation of Digimon World Re Decode, I ran into a problem with the game's in-game movies: replacing MOFLEX videos was quite difficult without relying on proprietary tools.

So I decided to build my own open-source MOFLEX toolkit.

GitHub:
https://github.com/koori0831/MoflexTool

Why I made this​

A few years ago, when I was working on 3DS modding, I remember having to rely on Nintendo's official tools when dealing with MOFLEX videos.

At the time, there wasn't a proper open-source toolchain that I could use for this kind of work, which made video replacement particularly inconvenient.

Since I'm currently working on a Korean fan translation of Digimon World Re Decode, I decided to finally tackle the problem myself.

The project started as a tool I needed for my own translation work, but I decided to make it open source in case it can be useful to other translators, ROM hackers, and preservation projects.

What is MoflexTool?​

d5ycHs7fxEpF5FrrfliviMaBseK9gN.png

MoflexTool is an open-source toolkit for working with MOFLEX / Mobiclip videos used by Nintendo 3DS games.

It currently provides:

  • MOFLEX container parsing and remuxing
  • Mobiclip video decoding
  • Mobiclip video encoding
  • IMA-ADPCM / FastAudio support
  • Video and audio extraction
  • Reference-based encoding for replacing existing game movies
  • CLI tools
  • Avalonia GUI

The main goal is to make it possible to replace videos in 3DS games without requiring Nintendo's proprietary Mobiclip encoder.

Real hardware testing​

Since the tool was made for my own translation project, I tested it with Digimon World Re Decode.

I successfully replaced one of the game's cutscenes with a re-encoded MOFLEX file.

The resulting video is approximately 42 seconds long and was tested on a real Old Nintendo 3DS with stereoscopic 3D enabled, where it played all the way to the end.

I also tested the output in the Azahar emulator.

Here's a video showing the tool and the resulting playback:

One interesting thing I found during testing was that the emulator was more forgiving than the real hardware in some cases. For example, an audio packet extending past the final video frame could play correctly in the emulator but cause a crash on the real 3DS.

So real-hardware testing turned out to be particularly important for this project.

Development​

This project was developed with the help of Claude, which I used extensively as an AI-assisted programming and research tool.

I used it to help with implementation, debugging, code exploration, and working through some of the reverse-engineering problems involved in understanding the format.

The actual format analysis and validation were performed against game files I had access to, and I tested the resulting implementation against both original files and real hardware.

For the container format, I was able to regenerate original files and verify them byte-for-byte for the samples I tested.

The video encoder is my own implementation, while the decoder follows the publicly available Mobiclip implementation in FFmpeg.

Current status​

The tool is still under active development.

Some limitations remain, particularly around compatibility with more games and further validation of FastAudio against original game footage.

But the core workflow of:

video → MOFLEX → 3DS game → real hardware playback

is working for the game I've tested so far.

Repository​

https://github.com/koori0831/MoflexTool

The project is licensed under LGPL-2.1.

I hope this can be useful to anyone working on 3DS fan translations, ROM hacks, game preservation, or other projects involving MOFLEX videos.

If anyone has games containing MOFLEX videos that behave differently, I'd also be very interested in testing them.

来源:Gbatemp · gbatemp.net