ROM Hack Hatsune Miku: Project Mirai DX Hacking Thread

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
I know this isn't exactly the most popular game to hack or mess around with but I think it deserves its own thread, due to the lack of information elsewhere on this subject.

All the game's files are in bcstm, dsc, or bin extensions. Dsc files are still mostly a mystery, although custom songs have been made (and I have no clue how). Most of the game's files are in .bin format, and are actually disguised as more files such as CTPK textures, Nintendo archives (.narc files), camera/stage/animation data, 3D models, and more.

Also check out the new Mirai Toolkit, a collection of tools I put together to make hacking easier. It includes many pre-existing tools as well as one or two custom ones made specifically for this game!

~Textures~
There are multiple categories of textures with this game, one more difficult to edit than the other. Here they are:

Stage/Character Model Textures
You'll find these in the /romfs/nwbin folder. The ones you want will always be named "obj_*.bin". These are extremely easy to edit; open them in Ohana3ds and you'll be able to extract the textures to png format, edit them, and import hem back before hitting "Save". Easy as that.

At this point, I don't think models can be imported, but you can use Every File Explorer to export them.
PV, UI and Menu Textures
These are the tougher ones. You'll need the following:
  • CTPKTool
  • HxD or your favorite hex editor
  • Your texture file from the /romfs/aet_en folder, making sure it starts with spr_ae
To start, open up your /romfs/aet_en/spr_ae_whatever.bin file in HxD or your hex editor of choice. Find the first "CTPK" header and take note of which line it starts on. This header will include both an uppercase "CTPK" and a lowercase "ctpk" a few lines down; there are both part of one header.

Next up, find the next header and take note of which line the uppercase "CTPK" is on. Now select everything before the 2nd header (not including), and stop selecting when you finish highlighting the 1st header (nothing before it!). This is your image data. Copy this all and paste it into a new file and save it as <whatever>.ctpk, then extract it with CTPKTool. At this point it's a good idea to make a backup of your original spr_ae_whatever.bin file, because you'll need one later.

izLowVd.png

This is the header. Copy everything right from the start of my selection right up until (but not including) the next CTPK header.

You should end up with a folder containing your extracted image as well as an xml file - keep the xml file with the png! You're free to edit the png freely, just leave the xml alone. Once you finish editing, repack your file as ctpk using CTPKTool.

Wk5ksUK.png

Example command line. Change the filenames to match your setup. I renamed my CTPKTool exe file to just "ctpktool.exe" to make things easier. -x is for extract, -c is for create.

Next, open your new ctpk file with HxD or your editor of choice and select everything. Copy it. Next up, select the same section of the original file you selected in the second step. Delete it, then paste in the modified data. Now compare it with your original file; if it's bigger, delete zeroes from the end of the modified part until the filesize matches. If it's smaller, add zeroes until it matches. It had to match exactly or the game will crash!

AnJ4gIE.png

I went and added some zeroes here since the file was 4 bytes too small.

Make sure you have it set to "Insert" and not "Overwrite" to add zeroes. You can do this by hitting the Insert button on your keyboard. There's a bit at the bottom right that tells you whether you're on Insert or Overwrite.

Remember, each spr_ae file is made of multiple CTPK files; for each, you can select everything from and including one header up until just before the next one, doesn't have to be the top one in the list. Do this if you can't find the textures you're looking for. For example, if you want to modify the buttons, you'll have to select the 3rd CTPK file down from the top to acually get the button textures. Otherwise you'll end up with some of the bottom screen textures, not the button icons.
~Chart editing~
I can't get this to work properly, but your mileage may vary to mine. You can give these a shot, though I doubt they'll work properly:
Remember, your mileage may vary. And when I say the old editor requires you to do math, I'm not kidding. Have a calculator ready.
~Music editing~
This is probably the easiest of all the hacks. You'll need:
You'll find the game's audio files under /sound/stream, and they'll be in bcstm format. Convert this to wav by opening the file in EFE, File > Save As... And select wav from the dropdown. Open this in Audacity.

Notice the silent space at the beginning? Take note of how long it lasts by zooming in (ctrl+1) and making a selection right before the audio starts. Take note of the number displayed in the "Selection end" box. For example, let's say it says 00:03:15. That's 3.15 seconds. Write that number down somewhere.

PZlItrb.png

Next, take the song you want to replace the default one with and open it in Audacity, then delete any silent space at the beginning. Go under "Generate > Silence" on the top toolbar and input the number from earlier (might not be this exact path, going from memory here). You have now synced the song! Save the file as .wav with the same name as the original file, then open it with Looping Audio Converter.

LsYHZDW.png
KG4Qmus.png

Once it's open, make sure to select "BCSTM" (not BRSTM) and start the conversion. Name the newly converted file the same name as the original, and you're done! This program also does bulk conversion, so if you have multiple files in a folder to convert you can do them all at once.

vBSZ8qG.png
Anyway, please feel free to share any info you've found on this topic! There's still lots that has yet to be figured out, such as proper dsc editing and such.

I've made a public document for information that anyone can edit. Misuse WILL cause it to be locked and removed. Please don't be a jerk and ruin it for everyone. This will be used for documenting information, filetypes, and everything related to hacking this game.

Also, before anyone else mentions it, no nsfw mods or content.
 
Last edited by dj505,

Enovale

Hey. I exist. Woo
Member
Joined
Jul 12, 2016
Messages
833
Trophies
0
Location
Narnia
XP
946
Country
United States
Quick update, I found this chart editor in a post on the VocaloidOtaku forum that can be used to edit the dsc files.
Holy crap thanks for finding that editor, I've been looking everywhere! (Also thanks for.. thanking me :) )

EDIT: also, I can't test right now, but I bet you can reimport models with EFE, since it can export. Also, how do you edit the moflex files?

EDIT EDIT: you can just find the list of pv id association from a text file in the pc folder I think, but I bet you already knew that lol
 
Last edited by Enovale,

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
Holy crap thanks for finding that editor, I've been looking everywhere! (Also thanks for.. thanking me :) )

EDIT: also, I can't test right now, but I bet you can reimport models with EFE, since it can export. Also, how do you edit the moflex files?
I could import the files with EFE, but I couldn't save the file because it would error out. Ended up using the original Ohana3DS to import files.

The moflex files weren't too difficult. I had to track down a copy of the Mobiclip editor (I think it was) along with the Nintendo licence, so it's probably not legal to share it here :/ Wasn't very difficult to find tho.
 
Last edited by dj505,

Enovale

Hey. I exist. Woo
Member
Joined
Jul 12, 2016
Messages
833
Trophies
0
Location
Narnia
XP
946
Country
United States
I could import the files with EFE, but I couldn't save the file because it would error out. Ended up using the original Ohana3DS to import files.

The moflex files weren't too difficult. I had to track down a copy of the Mobiclip editor (I think it was) along with the Nintendo licence, so it's probably not legal to share it here :/ Wasn't very difficult to find tho.
Oh okay, thnx
 

Enovale

Hey. I exist. Woo
Member
Joined
Jul 12, 2016
Messages
833
Trophies
0
Location
Narnia
XP
946
Country
United States
Ok, so the only way to edit pretty much anything in the aet_en folder is through hex editing, according to Stewie1.0. I have absolutely no clue where to even start with this. Wish me luck.
Good luck! I don't know anything about hex editing lol
 

dj505

Inexperienced Romhacker
OP
Member
Joined
Oct 4, 2014
Messages
556
Trophies
0
Location
Most likely at the arcade
Website
www.youtube.com
XP
844
Country
Canada
OK I FIGURED OUT HOW TO EDIT THE FILES IN THE aet_en FOLDER!

Apparently they're actually ctpk files! I opened the files in a hex editor and reoved EVERYTHING up until the line that starts with "CTPK" then used an extraction tool, and it worked perfectly!
 
  • Like
Reactions: Enovale

Enovale

Hey. I exist. Woo
Member
Joined
Jul 12, 2016
Messages
833
Trophies
0
Location
Narnia
XP
946
Country
United States
OK I FIGURED OUT HOW TO EDIT THE FILES IN THE aet_en FOLDER!

Apparently they're actually ctpk files! I opened the files in a hex editor and reoved EVERYTHING up until the line that starts with "CTPK" then used an extraction tool, and it worked perfectly!
So what does this accomplish exactly? Is this the games actual code or menu images?

EDIT: never mind rechecked the OP. Once I can get back on my computer I'm gonna try to work with that DSC editor.
 
Last edited by Enovale,

Enovale

Hey. I exist. Woo
Member
Joined
Jul 12, 2016
Messages
833
Trophies
0
Location
Narnia
XP
946
Country
United States
~Music~
I like to convert the original song to a .wav file and open it with Audacity and measure the amount of silence at the beginning, then make it the same on the new song by deleting everything up to where the song is just about to begin and using the Generate > Silence option on the top bar. I'm only using covers of songs that are in the game for now until custom charts are a thing.

What converter did you use? the only ones I know of don't convert bcstm to wav or anything for that matter.[/spoiler]
 

Enovale

Hey. I exist. Woo
Member
Joined
Jul 12, 2016
Messages
833
Trophies
0
Location
Narnia
XP
946
Country
United States
Neither did I until a few days ago haha. Just open the bcstm file, click on file > save as... and make sure you select wav
thanks for the help,

(lol im making a undertale mod of this game and i feel both cringe and happiness at the same time)
 

Enovale

Hey. I exist. Woo
Member
Joined
Jul 12, 2016
Messages
833
Trophies
0
Location
Narnia
XP
946
Country
United States
Ok that sounds amazing tbh XD If you need anyone to test it I'd be happy to help!
right now im just working on dscs and music, maybe ill try editing the pvs??? im basing as many songs as i can from animated pvs instead of 3d ones so hopefully i can make it work... im also debating whether or not to make it the original or the vocaloid a cappella cover, ()

also, i have almost nothing done so far cause its so hard to find out how to do it XD So ive only just started. but when something even testable is made ill let you know!

Its also REALLY annoying to test dscs becuase SD cards...
 
Last edited by Enovale,

Enovale

Hey. I exist. Woo
Member
Joined
Jul 12, 2016
Messages
833
Trophies
0
Location
Narnia
XP
946
Country
United States
Weird, it's what I've been using... Try dragging and dropping the bcstm file into EFE. If that doesn't work download the newest version
i did both, but i guess anyway i seems the loopingaudioconverter does it as well so ill use that.
 

Enovale

Hey. I exist. Woo
Member
Joined
Jul 12, 2016
Messages
833
Trophies
0
Location
Narnia
XP
946
Country
United States
is there a way to straight up make a song shorter or longer so i dont have to heavily edit the song im importing?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I'm doing alright, thanks.
    +1
  • Maximumbeans @ Maximumbeans:
    That must be rough. Productive I'm sure but hard to balance with daily life
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Indeed. I've been working on getting this Infecutus chip to work on my PS2. But after soldering, I realised that a plastic piece was missing from the power ribbon cable to the power and eject buttons.
  • SylverReZ @ SylverReZ:
    Now I could go with soldering the contacts from the cable to the connector on the mobo, but doesn't sound like a good permanent solution.
  • Maximumbeans @ Maximumbeans:
    Man, that's beyond my brain :rofl: I'm no good with hardware for now. I'd like to get into hardmods in future though
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Maybe start practice soldering. Get a cheap-ass soldering iron and follow some good YouTube tutorials.
    +1
  • SylverReZ @ SylverReZ:
    Least my experience has gotten better than over a decade ago. My iron would constantly bump into components and break them.
  • Maximumbeans @ Maximumbeans:
    Sounds good. I actually did soldering but like 16 years ago for school so uuuuh probably rusty haha
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Same here. I did soldering at school from a teacher who I honestly liked since he had plenty of good electronics experience.
    +1
  • Maximumbeans @ Maximumbeans:
    I wish I could play chess well
    +1
  • Maximumbeans @ Maximumbeans:
    Useless but a true art
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I had a friend who had a glass chess set for their birthday.
  • SylverReZ @ SylverReZ:
    It was like all clear and fancy. Tbf I'm not too experienced with chess, but would like to learn someday.
  • Maximumbeans @ Maximumbeans:
    That sounds really cool
  • Maximumbeans @ Maximumbeans:
    I know the basics but no strategy at all :rofl:
    +1
  • Veho @ Veho:
    Watch chess streamers on Twitch and you'll pick up a thing or two.
    +1
  • Veho @ Veho:
    Not to mention there's an infinite number of chess games for every possible platform.
    +1
  • DinohScene @ DinohScene:
    just play it, get beaten a few times and start dominating
    +1
  • K3Nv2 @ K3Nv2:
    Nude chess is best
    +1
  • DinohScene @ DinohScene:
    strip checkers > nude chess
    +1
  • K3Nv2 @ K3Nv2:
    Nude checkers get jumped
    +1
  • SylverReZ @ SylverReZ:
    @Veho, I guess you'd pick up something while watching tub streams.
  • SylverReZ @ SylverReZ:
    @K3Nv2, Dick fights. :tpi:
  • Veho @ Veho:
    Turkish olive oil wrestling.
    +1
    Veho @ Veho: Turkish olive oil wrestling. +1