Skip to content

Instantly share code, notes, and snippets.

# PMX 2.0 file format #
This is a description of the PMX file format. This is used for 3D models in Miku Miku Dance (MMD).
Since I couldn't find any English descriptions of the PMX file format, I've made this, which is translated from http://gulshan-i-raz.geo.jp/labs/2012/10/17/pmx-format1/. I haven't used this file format yet, so please don't ask me what everything means.
An English guide to the PMD file format, which preceeded PMX, can be found here: http://mikumikudance.wikia.com/wiki/MMD:Polygon_Model_Data.
If you want to learn more, there are some open source projects on GitHub which can read this format, so go take a look at them.
Note: fields with type text begins with an int (32 bit) with how many bytes of text the section is.
@felixjones
felixjones / pmx21.md
Last active July 16, 2024 10:50
PMX (Polygon Model eXtended) 2.0, 2.1 File Format Specifications

PMX (Polygon Model eXtended) 2.1

This is an English description of the .PMX file format used in Miku Miku Dance (MMD).

PMX is the successor to the .PMD format (Polygon Model Data).

This is work-in-progress! Please leave feedback in the comments.

Todo

@felixjones
felixjones / hello_world.cpp
Last active March 9, 2019 16:16
C++ clone of rust gba-console's hello_world.rs example
#include <gba.hpp>
#define EVER ;;
using namespace gba;
int main( int argc, char * argv[] ) {
display::control = display::mode( 3 ).enable_layers( { 2 } );
uint8 px = gba::mode3.width / 2;
@felixjones
felixjones / irq.cpp
Last active March 20, 2019 13:52
C++ clone of rust gba-console's irq.rs example
#include <gba.hpp>
#define EVER ;;
using namespace gba;
static constexpr color::bgr555 BLACK( 0, 0, 0 );
static constexpr color::bgr555 RED( 31, 0, 0 );
static constexpr color::bgr555 GREEN( 0, 31, 0 );
static constexpr color::bgr555 BLUE( 0, 0, 31 );
@felixjones
felixjones / fire.arm.cpp
Last active March 21, 2019 13:25
C++ fire effect for Game Boy Advance
#include <gba.hpp>
#define EVER ;;
using namespace gba;
// Palette of fire "heat" values
static constexpr color::bgr555 fire_colors[] = {
color::rgb888( 0x070707 ), color::rgb888( 0x1F0707 ), color::rgb888( 0x2F0F07 ), color::rgb888( 0x470F07 ),
color::rgb888( 0x571707 ), color::rgb888( 0x671F07 ), color::rgb888( 0x771F07 ), color::rgb888( 0x8F2707 ),
@felixjones
felixjones / mode1_3d.cpp
Created April 28, 2019 11:58
C++ Mode 1 3D perspective camera for Game Boy Advance
#include <gba.hpp>
#include <gba_debug.hpp>
#include <gba_nitro.hpp>
#include "res_assets.h"
#define EVER ;;
using namespace gba;
@felixjones
felixjones / hello_world.cpp
Created October 13, 2019 22:53
gba++ clone of rust gba-console's hello_world.rs example
#include <gba/gba.hpp>
#define EVER ;;
using namespace gba;
static auto& DISPCNT = io::display::control;
static auto& DISPSTAT = io::display::status;
static auto& IE = io::interrupt::enable_mask;
static auto& IME = io::interrupt::master_enable;
@felixjones
felixjones / Teasource.zip
Last active March 11, 2021 11:00
The Teasource Pack
@felixjones
felixjones / AutoGamma.zip
Last active February 7, 2024 09:23
Auto Gamma