Editing Flash-Main

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 66: Line 66:
= MBR Types =
= MBR Types =


<source lang="C">
<pre>
typedef struct {
typedef struct
uint32_t start_lba;
{
uint32_t n_sectors;
unsigned int offset;
uint8_t flag1; // maybe part_id
unsigned int size;
uint8_t flag2;
unsigned char flag1;
uint16_t unknown;
unsigned char flag2;
uint64_t padding;
unsigned short unknown;
unsigned long padding;
} __attribute__((packed)) partition_t;
} __attribute__((packed)) partition_t;


typedef struct {
typedef struct
uint8_t magic[0x20]; // "SONY COMPUTER ENTERTAINMENT INC."
{
uint32_t version; // 1
uint8_t sony[0x20];
uint32_t mbr1_start; // ex: 0x10
uint32_t version;
uint32_t mbr2_start; // ex: 0x18
uint32_t total_size;
uint32_t unk[4]; // ex: (1, 1, 8, 1)
uint64_t padding;
uint32_t reserved;
uint32_t flag1;
uint8_t unused[0x1C0];
uint32_t flag2;
} __attribute__((packed)) master_block_v1_t;
uint64_t padding2;
 
partition_t partitions[16];
typedef struct {
} __attribute__((packed)) master_block_t;
uint8_t magic[0x20]; // "Sony Computer Entertainment Inc."
</pre>
uint32_t version; // 4
uint32_t n_sectors;
uint64_t reserved;
uint32_t loader_start; // ex: 0x11, 0x309
uint32_t loader_count; // ex: 0x267
uint64_t reserved2;
partition_t partitions[16];
} __attribute__((packed)) master_block_v4_t;
</source>


= MBR Contents (Example) (Internal) =
= MBR Contents (Example) (Internal) =
Please note that all contributions to PS4 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS4 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)