Jump to content

[OUTDATED] Dumping BV directly from RAM


Recommended Posts

Recommended to ignore this thread and instead read this one:

https://projectpokemon.org/forums/showthread.php?48749-Dump-online-battle-videos-from-codes

I know that with homebrew I'm able to dump the battle videos from my own extdata to read them with PkHeX.

I basically wanted to know if there's any difference between the battle videos files located on extdata and the ones I can see by writting a code of the battle on the Vs. Recorder while being connected to Internet?

I assume doing this basically downloads the battle vide file from somewhere on Global Link servers and temporarily stores it on the RAM to read it.

Would possible to extract this video from the RAM to open it with PkHeX? Has this been already documented or it's a totally new idea?

I've two EUR 3DS (one Old and one New) both running CFW so I would be able to dump ram with NTR to test anything if any dev would like to research this.

Thanks in advance for any answer.

Edited by Eskuero
Link to comment
Share on other sites

Only way to find out is to test it on a battle you have recorded.

Record -> dump data

Upload -> download from internet -> dump RAM

You'd need to dump a lot of RAM; the RAM ideally would store an exact copy of the bvid (which it then reads from to other memory locations), so just search for chunks of the bvid you dumped.

edit: SciresM confirms that battle videos are in the RAM and can be dumped 1:1.

Link to comment
Share on other sites

I managed to succesfully extract it from RAM and after selecting the exact bits I was able to read the file PkHeX. So I will leave what I did

Here's the results of my research:

I did this with a 10.5 New3DS running Reinand CFW and after aplying NTR CFW patches to dump memory of a EUR physical copy of Alpha Saphire.

You ofc need to be connected to the internet, sign-in the Vs. Recorder and write the code of the battle you would like to dump, once it shows the preview of the teams and the trainers teams we're ready to go. Open the NTR Menu > Process Manager > Search on the ProcessList for 0000002d > dump > And choose address 0x08000000.

After pressing A button to choose this option the game will likely trigger that press and attempt to load the battle crashing to a black screen but this is "normal" (in the sense that it always happens and cannot figure a fix for it).

Just wait until a message in the botton screen appears saying that "dump finished at addr: whatever"

Now you will probably have to force the 3ds to shutdown by keeping pressed the Power button until it does.

A new file named "dump_pid2d_0.dmp" will be on the SDCard. Copy that to computer and open it with any hex editor. HxD is really recommended.

There're multiple offsets in this file where your desired battle is stored. Usually it will cloned at many places. They are usually stored at 1FBA70, 208E40, 2E74AC, 8D6D30 and 8DED48.

However if you struggle finding them there and you do not plan making any automated app to import those bits you need to know that the video files always starts with the following hex values "0X 01 81 E2 00 00" where X usually is a 0, I also had a few examples when it was a 5 or a 7. Anyway you need to select every bit after the 0X one I mentioned (included) until you get a length value of 2E60.

Now you open a new file with HxD and copy everything you selected there and save with any desired extension-less name. If you did everything right you should be able to open this with PkHeX to see the 12 Pokemon used in the battle.

Notice that if you have uploaded battles in the past when you enter the Vs. Recorder while connected to internet it will detect those and copy them to RAM.

In my case I had one battle I uploaded in the past, so that was copied to the 1FBA70 offset and the other four I mentioned before were filled with copies of the one I read from the code. You can guess which one is the one you want by looking a bit down after looking for the starting offsets, the name of the trainers involved in the battle should I appear close to it.

[ATTACH=CONFIG]12886[/ATTACH]

Link to comment
Share on other sites

  • 3 months later...
I managed to succesfully extract it from RAM and after selecting the exact bits I was able to read the file PkHeX. So I will leave what I did

Here's the results of my research:

I did this with a 10.5 New3DS running Reinand CFW and after aplying NTR CFW patches to dump memory of a EUR physical copy of Alpha Saphire.

You ofc need to be connected to the internet, sign-in the Vs. Recorder and write the code of the battle you would like to dump, once it shows the preview of the teams and the trainers teams we're ready to go. Open the NTR Menu > Process Manager > Search on the ProcessList for 0000002d > dump > And choose address 0x08000000.

After pressing A button to choose this option the game will likely trigger that press and attempt to load the battle crashing to a black screen but this is "normal" (in the sense that it always happens and cannot figure a fix for it).

Just wait until a message in the botton screen appears saying that "dump finished at addr: whatever"

Now you will probably have to force the 3ds to shutdown by keeping pressed the Power button until it does.

A new file named "dump_pid2d_0.dmp" will be on the SDCard. Copy that to computer and open it with any hex editor. HxD is really recommended.

There're multiple offsets in this file where your desired battle is stored. Usually it will cloned at many places. They are usually stored at 1FBA70, 208E40, 2E74AC, 8D6D30 and 8DED48.

However if you struggle finding them there and you do not plan making any automated app to import those bits you need to know that the video files always starts with the following hex values "0X 01 81 E2 00 00" where X usually is a 0, I also had a few examples when it was a 5 or a 7. Anyway you need to select every bit after the 0X one I mentioned (included) until you get a length value of 2E60.

Now you open a new file with HxD and copy everything you selected there and save with any desired extension-less name. If you did everything right you should be able to open this with PkHeX to see the 12 Pokemon used in the battle.

Notice that if you have uploaded battles in the past when you enter the Vs. Recorder while connected to internet it will detect those and copy them to RAM.

In my case I had one battle I uploaded in the past, so that was copied to the 1FBA70 offset and the other four I mentioned before were filled with copies of the one I read from the code. You can guess which one is the one you want by looking a bit down after looking for the starting offsets, the name of the trainers involved in the battle should I appear close to it.

[ATTACH=CONFIG]12886[/ATTACH]

Really amazing work, and I think I am quite close to getting this to work for my self, but for one I am on a o3dsxl, but ntr works, and I have a usa version of the game AlphaSaphire, every time I try the debug menu I get inconsistent process ids. first time I got 2e, and guessed it was right seemed to work but only got my own sd card ones. next time I removed all the videos and the last two ids were 28 and 29, tried 28 it worked one time(back before the sd card ones were removed) but when I got the dump file it didn't have the video data. is there a more consistent way to figure out which process it is?

Any help you could provide with the ids or anything here would be greatly appreciated

Link to comment
Share on other sites

Really amazing work, and I think I am quite close to getting this to work for my self, but for one I am on a o3dsxl, but ntr works, and I have a usa version of the game AlphaSaphire, every time I try the debug menu I get inconsistent process ids. first time I got 2e, and guessed it was right seemed to work but only got my own sd card ones. next time I removed all the videos and the last two ids were 28 and 29, tried 28 it worked one time(back before the sd card ones were removed) but when I got the dump file it didn't have the video data. is there a more consistent way to figure out which process it is?

Any help you could provide with the ids or anything here would be greatly appreciated

I made a much better explaination of how to just dump the specific battle video without using an HeX editor here:

https://projectpokemon.org/forums/showthread.php?48749-Dump-online-battle-videos-from-codes

It also provides info about how to get the proces pid at any running time.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...