Editing ISO.BIN.EDAT
Jump to navigation
Jump to search
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 1: | Line 1: | ||
== | ==iso.bin structure (decrypted)== | ||
All offsets are in little endian (except in the last table where there are two counters in decimal) | All offsets are in little endian (except in the last table where there are two counters in decimal) | ||
Line 21: | Line 9: | ||
disc_map_tables ----> 0x004400 (disc1), 0x104400 (disc2), 0x204400 (disc3), 0x304400 (disc4), etc... | disc_map_tables ----> 0x004400 (disc1), 0x104400 (disc2), 0x204400 (disc3), 0x304400 (disc4), etc... | ||
===Header | ===iso.bin Header=== | ||
1 block = 1024 bytes (0x400) | 1 block = 1024 bytes (0x400) | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 30: | Line 16: | ||
! Block Nº !! Offset !! Length !! Name !! Example !! Description | ! Block Nº !! Offset !! Length !! Name !! Example !! Description | ||
|- | |- | ||
| rowspan="5" style="background-color:#DDDDDD;" | 0 <br /> '''common_header''' || 0x0000 || | | rowspan="5" style="background-color:#DDDDDD;" | 0 <br /> '''common_header''' || 0x0000 || 16 bytes (0x10) || '''magic''' || PSTITLEIMG000000 || | ||
|- | |- | ||
| 0x0010 || | | 0x0010 || 496 bytes (0x1F0) || ''padding'' || || | ||
|- | |- | ||
| 0x0200 || | | 0x0200 || 100 bytes (0x64) || '''discs_start_offsets''' || 00 04 00 00 || 25 chunks of 4 bytes ... each chunk = start position of each disc, in games with only 1 disc only the first 4 bytes are used | ||
|- | |- | ||
| 0x0264 || | | 0x0264 || 16 bytes (0x10) || '''game_id''' || _SLES_12345 || common identifyer for all discs | ||
|- | |- | ||
| 0x0274 || | | 0x0274 || 396 bytes (0x18C) || ''padding'' || || | ||
|- | |- | ||
|} | |} | ||
=== | ===iso.bin Disc map=== | ||
64 clusters, 1024 blocks, 10485576 bytes (0x100000) | 64 clusters, 1024 blocks, 10485576 bytes (0x100000) | ||
This structure is repeated one time for every disc of the game all them joined together | This structure is repeated one time for every disc of the game all them joined together consecutively, the whole space is reserved even when there is no data used | ||
{| class="wikitable | {| class="wikitable" | ||
|- | |- | ||
! Cluster Nº !! Block Nº !! Offset !! Length !! Name !! Example !! Notes | ! Cluster Nº !! Block Nº !! Offset !! Length !! Name !! Example !! Notes | ||
|- | |- | ||
| rowspan=" | | rowspan="25" style="background-color:#DDDDDD;" | 0 <br /> '''Disc map header''' || rowspan="3" style="background-color:#DDDDDD;" | 1 || 0x0400 || 12 bytes (0x0c) || '''magic''' || PSISOIMG0000 || In "PSP Minis" It's NPUMDIMG ([[Environments|NP]] UMD Image) ..... probably another for "ps2 classics" (speculation) | ||
|- | |- | ||
| | | 0x040c || 4 bytes (0x04) || isosize || || 0x100000 + size of iso-image padded to 0x9300 | ||
|- | |- | ||
| | | 0x0410 || 1008 bytes (0x3F0) || ''padding'' || || | ||
|- | |- | ||
| rowspan=" | | rowspan="2" style="background-color:#DDDDDD;" | 2 || 0x0800 || 16 bytes (0x10) || '''disc_id''' || _SLES_12345 || in games with several discs each disc has a different id | ||
|- | |- | ||
| | | 0x0810 || 1008 bytes (0x3F0) || ''padding'' || || | ||
|- | |- | ||
| | | rowspan="2" style="background-color:#DDDDDD;" | 3 || 0x0C00 || 1020 bytes (0x3FС) || '''disc_TOC''' || variable || style="background-color:#DDDDDD;" | Table of content, like CUE sheet, supports upto 99 entries (102 entries total). See '''Disc toc table''' below | ||
|- | |- | ||
| | | 0x0FFC || 4 bytes (0x4) || disc_start_offset || 0x100000 || | ||
|- | |- | ||
| | | style="background-color:#DDDDDD;" | 4~ || 0x1000 || 1568 bytes (0x620) || '''audio tracks table''' || || datas of audio tracks (2-99). offset, size, and more. See '''Audio tracks table''' below | ||
|- | |- | ||
| rowspan=" | | rowspan="5" style="background-color:#DDDDDD;" | 5~ || 0x1620 || 180 bytes (0xB4) || ''game params'' || || <!-- doesnt makes sense to start using a block with a padding, i bet it was an unused area in the file/s i was looking at when i made this table --> | ||
|- | |- | ||
| | | 0x16D4 || 2 bytes (0x02) || '''block size ?''' || 1024 || <--- this is wrong, but matches for the first disc | ||
|- | |- | ||
| | | 0x16D6 || 2 bytes (0x02) || '''number of clusters''' || 64 || its always 64 clusters (so seems to be right) | ||
|- | |- | ||
| | | 0x16D8 || 2 bytes (0x02) || '''number of blocks ?''' || 1024 || <--- this is wrong, but matches for the first disc | ||
|- | |- | ||
| | | 0x16DA || 294 bytes (0x126) || ''padding'' || || | ||
|- | |- | ||
| | | style="background-color:#DDDDDD;" | 6 || 0x1800 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| | | style="background-color:#DDDDDD;" | 7 || 0x1C00 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| | | style="background-color:#DDDDDD;" | 8 || 0x2000 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | | | style="background-color:#DDDDDD;" | 9 || 0x2400 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | | | style="background-color:#DDDDDD;" | 10 || 0x2800 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | | | style="background-color:#DDDDDD;" | 11 || 0x2C00 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | | | style="background-color:#DDDDDD;" | 12 || 0x3000 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | | | style="background-color:#DDDDDD;" | 13 || 0x3400 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | | | style="background-color:#DDDDDD;" | 14 || 0x3800 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | | | style="background-color:#DDDDDD;" | 15 || 0x3C00 || 1024 bytes (0x400) || ''not used'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | | | rowspan="2" style="background-color:#DDDDDD;" | 16 || 0x4000 || 16 bytes (0x10) || '''checksum''' || 1CCE0033 60C6E8A6 B36A972D 00EAFDBF || seems to be the checksum of this block, and because this block is always unused... this checksum is always the same | ||
|- | |- | ||
| | | 0x4010 || 1008 bytes (0x3F0) || ''padding'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | | | rowspan="2" style="background-color:#DDDDDD;" | 1 <br /> '''Disc map table''' || style="background-color:#DDDDDD;" | 17 || 0x4400 || variable || '''Disc map table''' || || rowspan="3" style="background-color:#DDDDDD;" | divided in chunks of 32 bytes. See '''Disc map table''' table below | ||
| rowspan=" | |||
|- | |- | ||
| style="background-color:#DDDDDD;" | Up to 32 || || || || | | style="background-color:#DDDDDD;" | Up to 32 || || || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | Up to 64 <br /> ''' | | style="background-color:#DDDDDD;" | Up to 64 <br /> '''Disc map table''' || || || || | ||
|- | |- | ||
|} | |} | ||
=== | === disc_TOC === | ||
Entry structure: | Entry structure: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! | ! Offset !! Length !! Name !! Example !! Notes | ||
|- | |- | ||
| 0x00 || 1 byte (0x01) || '''TYPE''' || 0x41/0x01 || entry flags | |||
|- | |- | ||
| 0x01 || | | 0x01 || 1 byte (0x01) || '''TNO''' || 00 || always zero | ||
|- | |- | ||
| 0x02 || | | 0x02 || 1 byte (0x01) || '''POINT''' || 0xA0/0xA1/0xA2/0x01/0x02/0x03/etc || increases | ||
|- | |- | ||
| 0x03 || | | 0x03 || 1 byte (0x01) || '''MIN''' || varies || decimal | ||
|- | |- | ||
| 0x04 || | | 0x04 || 1 byte (0x01) || '''SEC''' || varies || decimal | ||
|- | |- | ||
| 0x05 || | | 0x05 || 1 byte (0x01) || '''FRAME''' || varies || decimal | ||
|- | |- | ||
| 0x06 || | | 0x06 || 1 byte (0x01) || '''ZERO''' || 00 || always zero | ||
|- | |- | ||
| 0x07 || | | 0x07 || 1 byte (0x01) || '''PMIN''' || varies || decimal | ||
|- | |- | ||
| 0x08 || | | 0x08 || 1 byte (0x01) || '''PSEC''' || varies || decimal | ||
|- | |- | ||
| 0x09 || | | 0x09 || 1 byte (0x01) || '''PFRAME''' || varies || decimal | ||
|- | |- | ||
|} | |} | ||
===Audio tracks table=== | |||
Entry structure: | Entry structure: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! | ! Offset !! Length !! Name !! Example !! Notes | ||
|- | |- | ||
| 0x00 || 4 || '''offset''' || || | |||
|- | |- | ||
| 0x04 || | | 0x04 || 4 || '''size''' || || | ||
|- | |- | ||
| 0x08 || | | 0x08 || 4 || '''unknown_0''' || || always zeroed | ||
|- | |- | ||
| 0x0C || | | 0x0C || 4 || '''and more \o/''' || || encryption key | ||
|- | |- | ||
|} | |} | ||
====Disc map table==== | ====iso.bin Disc map table==== | ||
The table has an area reserved of 1032192 bytes. Divided in 32256 entries, of 32 bytes each entry. The number of used entryes in the file_table can vary (seems to be dependant of the .iso contents). The number of entries availables to store data is affected by a checksum (16 bytes) that is present only in the the last block of each cluster (in block nº16 of every cluster) | The table has an area reserved of 1032192 bytes. Divided in 32256 entries, of 32 bytes each entry. The number of used entryes in the file_table can vary (seems to be dependant of the .iso contents). The number of entries availables to store data is affected by a checksum (16 bytes) that is present only in the the last block of each cluster (in block nº16 of every cluster) | ||
When this checksum is between used entryes... his length is 32 bytes (it "steals" the area of one entry) | When this checksum is between used entryes... his length is 32 bytes (it "steals" the area of one entry) | ||
Line 174: | Line 150: | ||
! Entry Nº !! Offset !! Length !! Name !! Example !! Notes | ! Entry Nº !! Offset !! Length !! Name !! Example !! Notes | ||
|- | |- | ||
| rowspan="5" style="background-color:#DDDDDD;" | 1 || 0x00 || | | rowspan="5" style="background-color:#DDDDDD;" | 1 || 0x00 || 4 bytes (0x04) || '''file_offset''' || 0 || file offset from start of .iso root (for the first entry is always 0) | ||
|- | |- | ||
| 0x04 || | | 0x04 || 2 bytes (0x02) || '''file_size''' || variable || this size determines the displacement of the next file (in the next entry) | ||
|- | |- | ||
| 0x06 || | | 0x06 || 2 bytes (0x02) || '''file_type ?''' || 01 00 || usually 1... and 0 for the last entry | ||
|- | |- | ||
| 0x08 || | | 0x08 || 16 bytes (0x10) || '''file_checksum''' || variable || First 16 bytes of the sha1 of the uncompressed data | ||
|- | |- | ||
| 0x18 || | | 0x18 || 8 bytes (0x08) || ''padding'' || || | ||
|- | |- | ||
| style="background-color:#DDDDDD;" | Up to 32256 || || || || || same structure than the previous entry | | style="background-color:#DDDDDD;" | Up to 32256 || || || || || same structure than the previous entry | ||
|- | |||
|} | |} | ||
=== | ===iso.bin Common Disc table=== | ||
Composed by a variable number of entries (depends of the number of files/folders inside the discs), 12 bytes each entry | Composed by a variable number of entries (depends of the number of files/folders inside the discs), 12 bytes each entry | ||
Line 194: | Line 171: | ||
! Entry Nº !! Offset !! Length !! Name !! Example !! Notes | ! Entry Nº !! Offset !! Length !! Name !! Example !! Notes | ||
|- | |- | ||
| rowspan="4" style="background-color:#DDDDDD;" | 1 || 0x00 || | | rowspan="4" style="background-color:#DDDDDD;" | 1 || 0x00 || 4 bytes (0x04) || '''file_offset ?''' || 0 || always increases | ||
|- | |- | ||
| 0x04 || | | 0x04 || 2 bytes (0x02) || '''file_type ?''' || 01 01 || always 01 01 | ||
|- | |- | ||
| 0x06 || | | 0x06 || 3 bytes (0x03) || '''counter 1''' || || some kind of counter, in decimal, always increases <-------- related with "sectors" inside the .iso ? | ||
|- | |- | ||
| 0x09 || | | 0x09 || 3 bytes (0x03) || '''counter 2''' || || another counter, in decimal, always increases, its in relationship with the previous counter (this one is always 200 bytes bigger than the previous one) | ||
|- | |- | ||
|} | |} | ||
There are 2 "special" entries to mark the "start of a disc" (FFFFFFFF 00000000 FFFFFFFF), and the "end of a disc" (FFFFFFFF FFFFFFFF FFFFFFFF). Between the start and the end, there are a variable number of entries. | |||
There is also an added string at the end of the last disc (after the last FFFFFFFF FFFFFFFF FFFFFFFF entry)... is a 40 bytes unknown area (in my example my game had 4 discs so maybe this area is divided in chunks of 10 bytes for each disc) | |||
So as an example... for a game with 4 discs this table is: | |||
* first entry of disc 1 ---> FFFFFFFF 00000000 FFFFFFFF (start of disc 1) | |||
* next entries of disc 1 --> data from disc.... the number is variable | |||
* last entry of disc 1 ---> FFFFFFFF FFFFFFFF FFFFFFFF (end of disc 1) | |||
* first entry of disc 2 ---> FFFFFFFF 00000000 FFFFFFFF (start of disc 2) | |||
* next entries of disc 2 --> data from disc.... the number is variable | |||
* last entry of disc 2 ---> FFFFFFFF FFFFFFFF FFFFFFFF (end of disc 2) | |||
* first entry of disc 3 ---> FFFFFFFF 00000000 FFFFFFFF (start of disc 3) | |||
* next entries of disc 3 --> data from disc.... the number is variable | |||
* last entry of disc 3 ---> FFFFFFFF FFFFFFFF FFFFFFFF (end of disc 3) | |||
* first entry of disc 4 ---> FFFFFFFF 00000000 FFFFFFFF (start of disc 4) | |||
* next entries of disc 4 --> data from disc.... the number is variable | |||
* last entry of disc 4 ---> FFFFFFFF FFFFFFFF FFFFFFFF (end of disc 4) | |||
* unknown area of 40 bytes (10 bytes for each disc ?) | |||
* | |||
* | |||
== Minis ISO.BIN structure == | == Minis ISO.BIN structure == | ||
Line 427: | Line 388: | ||
=== Decrypting with PSL1GHT === | === Decrypting with PSL1GHT === | ||
* https://github.com/euss/psp_edat_decryptor (not my code, just git'ed it for convenience) | |||
* | * mirrors: [http://mir.cr/0XXBT99Z], [http://mir.cr/1SNVEH2D], [http://mir.cr/ZKZJFPET] | ||
* | |||
==About PS2 Classics== | ==About PS2 Classics== |