Using rxTools to dump VRAM... how to convert to bmp or png?

Discussion in '3DS - Flashcards & Custom Firmwares' started by OctopusRift, Jul 11, 2015.

  1. OctopusRift
    OP

    OctopusRift GBATemp's Local Octopus, Open 9am-2am. "Not Yet"

    Member
    1,460
    832
    Nov 19, 2014
    Saint Kitts and Nevis
    I wrote the mythread.c to dump the VRAM as shown on 3dbrew... now how do I convert it to a format a human can see?
     
  2. OctopusRift
    OP

    OctopusRift GBATemp's Local Octopus, Open 9am-2am. "Not Yet"

    Member
    1,460
    832
    Nov 19, 2014
    Saint Kitts and Nevis
    bumpppp
     
  3. Syphurith

    Syphurith Beginner

    Member
    641
    222
    Mar 8, 2013
    Switzerland
    Xi'an, Shaanxi Province
    If dumped length equals to "3*WIDTH*HEIGHT" that is a variety of BMP.
    You would have to find BMP header definition and modify it.
    Cause that is also 24 bits color, same as the default for BMP in Windows.
    I think you could have it easily..

    Or, create a BMP picture with HEIGHT * WIDTH.
    Then convert your dumped content (which follows order of B,G,R) to R,G,B.
    Then just replace it and all ok.
    Note: 3DS FB is rotated iirc. That's why i told you to use its WIDTH as height of BMP.

    Hope these help you.
    My BMP Header stored for a BMP565 does missing some part.
    If you would like to see it, just take a look at the attachment.
    Size: 0x140 * 0xF0. You would at least have to modify its width, height, RGB plates and TotalSize.
     

    Attached Files:

    OctopusRift likes this.
  4. Ericss

    Ericss GBAtemp Fan

    Member
    465
    212
    Sep 1, 2010
    United States
    How do you dump VRAM with rxTools?
     
  5. zoogie

    zoogie simple pimp tool

    Member
    6,566
    8,445
    Nov 30, 2014
    United States
    Look in rxtools for Mythread.c and replace code with this sekret hex codez...
    http://pastebin.com/7P5SYsjQ
    and you too can be l33t like Reisyukaku.
     
    Ericss likes this.
  6. OctopusRift
    OP

    OctopusRift GBATemp's Local Octopus, Open 9am-2am. "Not Yet"

    Member
    1,460
    832
    Nov 19, 2014
    Saint Kitts and Nevis
    Oh shit thanks... I was trying to Frankenstein my own code together.
     
  7. OctopusRift
    OP

    OctopusRift GBATemp's Local Octopus, Open 9am-2am. "Not Yet"

    Member
    1,460
    832
    Nov 19, 2014
    Saint Kitts and Nevis
    Hmmm... it's kinda working... the same way mine did. But it wont make bmps
     
  8. Syphurith

    Syphurith Beginner

    Member
    641
    222
    Mar 8, 2013
    Switzerland
    Xi'an, Shaanxi Province
    Oh well. A simple way for you (maybe, but really pratical)
    1. Use PhotoShop or other Image Editor, create a pure color BMP image (remember to specify its format as BMP565 or other), with correct width & height.
    2. Use any kind of hexeditor that working, to open the created BMP file.
    3. Look at offset 0x0A. It describe the header length (Surely in Hex). For example in my 565 header provided, 0x46.
    4. Those width, height, size should be all ok if you've created a correct image before.
    5. Get the main data (dumped) and replace those after the header length. For example, i could wrote the content of dump from 0x0, to new file started from 0x46.
    6. Save it and take a look at it. If color glitches.. for 565 switch 0x37 and 0x3E. (Original RGB565 could be F8 00 00 E0 07 00 00 1F 00 00 on 0x37)
    7. Well not difficult if you just want to switch B for R, for 24-bits RGB BMP file.
    Hope you could get your BMP image, or it be introduced as a stable feature.

    Quite sorry for you cause i haven't ever dumped VRAM, and have no dumps for those.
    If you still could not get that done, give me a dump (and provide the Width, Height, and Format) - let me have a try - after i wake up tommorrow.