Editing XMB Fonts
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 174: | Line 174: | ||
| [[3.70_CEX|3.70]]~[[4.55_CEX|4.55]] || 420192 || 98e8f3545e04ad62da19c2fc63210cfd || 0x0100 || 0x0142 || added uF8B7 and uF8B8 (headset icons) | | [[3.70_CEX|3.70]]~[[4.55_CEX|4.55]] || 420192 || 98e8f3545e04ad62da19c2fc63210cfd || 0x0100 || 0x0142 || added uF8B7 and uF8B8 (headset icons) | ||
|- | |- | ||
| [[4.60_CEX|4.60]]~[[4. | | [[4.60_CEX|4.60]]~[[4.82_CEX|4.82]] || 424023 || 97daf9e7fff3a834bcf97c0c2240dced || 0x0100 || 0x014C || added uF895 to uF89E (playstation logos) | ||
|- | |- | ||
| colspan="7" {{cellcolors|lightgrey}} | | colspan="7" {{cellcolors|lightgrey}} | ||
Line 193: | Line 193: | ||
====Header==== | ====Header==== | ||
The header is only 0x8 bytes | The header is only 0x8 bytes lenght, in it can be seen the '''format_version''' of the imagefont structure (this is speculative though, needs to be confirmed), the '''index_entries''' that in the practise is the same than the number of icons contained in the file, and the '''index_offset''' to locate the index | ||
{| class="wikitable" | {| class="wikitable" | ||
|+imagefont.bin header | |+imagefont.bin header | ||
! Offset !! | ! Offset !! Lenght !! Name !! Example !! Remark | ||
|- | |- | ||
| align="center" | 0x00 || align="center" | 0x02 || '''format_version''' ? || align="center" | 01 00 || File structure/features identifyer ? | | align="center" | 0x00 || align="center" | 0x02 || '''format_version''' ? || align="center" | 01 00 || File structure/features identifyer ? | ||
Line 207: | Line 207: | ||
|} | |} | ||
By reading the header can be deduced some additional infos about the index. We know every entry in the index is 0x10 bytes | By reading the header can be deduced some additional infos about the index. We know every entry in the index is 0x10 bytes lenght so... '''index_entries''' * '''index_entry_lenght''' = '''index_lenght'''. Also '''index_offset''' + '''index_lenght''' = end of file | ||
From this point (after reading the header) the file access order "jumps" to the bottom of the file (to the index) so for wiki readers that are reading this for first time is suggested to scroll down the page and continue reading at the '''Index''' section | From this point (after reading the header) the file access order "jumps" to the bottom of the file (to the index) so for wiki readers that are reading this for first time is suggested to scroll down the page and continue reading at the '''Index''' section | ||
Line 247: | Line 247: | ||
{| class="wikitable" style="font-size:small;" | {| class="wikitable" style="font-size:small;" | ||
|+Palette header (0x6 | |+Palette header (0x6 lenght) | ||
! rowspan="2" | Offset !! rowspan="2" | | ! rowspan="2" | Offset !! rowspan="2" | Lenght !! rowspan="2" | Name !! colspan="5" | Examples !! rowspan="2" | Notes | ||
|- | |- | ||
! <abbr title="static. Is also the first in the index">uF880, button circle</abbr> !! <abbr title="animated, 1 frame. Is also the last in the index">uF6DF, zodiac pisces</abbr> !! <abbr title="animated, 2 frames">uF405, smiley laughing</abbr> !! <abbr title="animated, 3 frames">uF46F, weather raindrops</abbr> !! <abbr title="animated, 4 frames">uF8AB, battery charging</abbr> | ! <abbr title="static. Is also the first in the index">uF880, button circle</abbr> !! <abbr title="animated, 1 frame. Is also the last in the index">uF6DF, zodiac pisces</abbr> !! <abbr title="animated, 2 frames">uF405, smiley laughing</abbr> !! <abbr title="animated, 3 frames">uF46F, weather raindrops</abbr> !! <abbr title="animated, 4 frames">uF8AB, battery charging</abbr> | ||
Line 261: | Line 261: | ||
|} | |} | ||
From here can be deduced some infos, we know every frame is 0xC | From here can be deduced some infos, we know every frame is 0xC lenght so... '''frames_count''' * 0xC = '''frames_table_lenght''' (the position where starts the colormap). And '''colormap_count''' * '''colormap_bpp''' = '''colormap_lenght''' | ||
=====Palette frames table===== | =====Palette frames table===== | ||
The amount of entries in the palette frame table is defined by the value above named '''frames_count''', in static icons this area appears only one time, for animated icons there are several | The amount of entries in the palette frame table is defined by the value above named '''frames_count''', in static icons this area appears only one time, for animated icons there are several | ||
For every image in the icon (or every frame of the animation) there is an entry here of 0xC | For every image in the icon (or every frame of the animation) there is an entry here of 0xC lenght with info specific for that frame (doesnt applyes to other frames of the same animation)... in the practise what we are namig a frame here is the same than a image of the '''Image table''' that is going to be loaded in the next step | ||
The '''image_data_offset''' and ''' | The '''image_data_offset''' and '''image_data_lenght''' are used to locate the image (that needs to be zlib decompressed) | ||
The '''frame_time''' represents how many time in centiseconds is going to be displayed the image until the image of the next frame replaces it, this value is very related with the '''animation_time''' above, actually the '''animation_time''' should be equal to the sum of all '''frame_time''' of all the frames that composes the animation. It seems is not allowed (tests failed when trying it) to create a "blink" effect by using an '''animation_time''' bigger than the sum of all '''frame_time''' | The '''frame_time''' represents how many time in centiseconds is going to be displayed the image until the image of the next frame replaces it, this value is very related with the '''animation_time''' above, actually the '''animation_time''' should be equal to the sum of all '''frame_time''' of all the frames that composes the animation. It seems is not allowed (tests failed when trying it) to create a "blink" effect by using an '''animation_time''' bigger than the sum of all '''frame_time''' | ||
Line 279: | Line 279: | ||
{| class="wikitable" style="font-size:small;" | {| class="wikitable" style="font-size:small;" | ||
|+Palette frame (0xC | |+Palette frame (0xC lenght for every frame) | ||
! rowspan="2" | Offset !! rowspan="2" | | ! rowspan="2" | Offset !! rowspan="2" | Lenght !! rowspan="2" | Name !! colspan="5" | Examples !! rowspan="2" | Notes | ||
|- | |- | ||
! <abbr title="static. Is also the first in the index">uF880, button circle</abbr> !! <abbr title="animated, 1 frame. Is also the last in the index">uF6DF, zodiac pisces</abbr> !! <abbr title="animated, 2 frames">uF405, smiley laughing</abbr> !! <abbr title="animated, 3 frames">uF46F, weather raindrops</abbr> !! <abbr title="animated, 4 frames">uF8AB, battery charging</abbr> | ! <abbr title="static. Is also the first in the index">uF880, button circle</abbr> !! <abbr title="animated, 1 frame. Is also the last in the index">uF6DF, zodiac pisces</abbr> !! <abbr title="animated, 2 frames">uF405, smiley laughing</abbr> !! <abbr title="animated, 3 frames">uF46F, weather raindrops</abbr> !! <abbr title="animated, 4 frames">uF8AB, battery charging</abbr> | ||
Line 286: | Line 286: | ||
| 0x00 || 0x04 || '''image_data_offset''' || 00 00 00 08 || 00 02 43 A3 || 00 00 7B CF || 00 00 EE 59 || 00 00 4D 70 || image absolute offset | | 0x00 || 0x04 || '''image_data_offset''' || 00 00 00 08 || 00 02 43 A3 || 00 00 7B CF || 00 00 EE 59 || 00 00 4D 70 || image absolute offset | ||
|- | |- | ||
| 0x04 || 0x02 || ''' | | 0x04 || 0x02 || '''image_data_lenght''' || 01 D9 || 01 6D || 02 15 || 00 BA || 01 AE || image lenght (zlib compressed) | ||
|- | |- | ||
| 0x06 || 0x02 || '''frame_time''' || 00 00 || 00 3C || 00 3C || 00 3C || 00 3C || | | 0x06 || 0x02 || '''frame_time''' || 00 00 || 00 3C || 00 3C || 00 3C || 00 3C || | ||
Line 340: | Line 340: | ||
=====Palette colormap===== | =====Palette colormap===== | ||
The colormap is straightforwad, here every entry is indicated by the | The colormap is straightforwad, here every entry is indicated by the lenght of '''colormap_bpp''' (4 bytes for RGBA channels found always in ofw, other values not tested), and the amount of entries is indicated by the value of '''colormap_count''' (256 indexed colors found always used in ofw, other values incoming) | ||
The order of how the colors appears in the colormap is very important, every color is given a unique '''color_id''', the first color is ID = 0x00 and last color is ID = 0xFF (for a total of 256 indexed colors) | The order of how the colors appears in the colormap is very important, every color is given a unique '''color_id''', the first color is ID = 0x00 and last color is ID = 0xFF (for a total of 256 indexed colors) | ||
Line 349: | Line 349: | ||
{| class="wikitable" style="font-size:small;" | {| class="wikitable" style="font-size:small;" | ||
|+Color map (0x400 | |+Color map (0x400 lenght) | ||
! Offset !! | ! Offset !! Lenght !! Name !! Example !! Notes | ||
|- | |- | ||
| 0x000 || 0x04 || '''color_rgba''' || 01 00 00 FF || color id 0x00 | | 0x000 || 0x04 || '''color_rgba''' || 01 00 00 FF || color id 0x00 | ||
Line 370: | Line 370: | ||
There is an '''unknown''' value at the end, this one should be important (and maybe there is some easter egg hidden in it), is supposed to be a generic descriptor of the icon, or some information needed to know by the firmware about the icon BEFORE accessing any other aditionally data. The point is all the other areas that are going to be accessed in the next steps are compressed in zlib so this unknown value is something that is useful/interesting to know even BEFORE loading the icon data | There is an '''unknown''' value at the end, this one should be important (and maybe there is some easter egg hidden in it), is supposed to be a generic descriptor of the icon, or some information needed to know by the firmware about the icon BEFORE accessing any other aditionally data. The point is all the other areas that are going to be accessed in the next steps are compressed in zlib so this unknown value is something that is useful/interesting to know even BEFORE loading the icon data | ||
Then is used the value ''' | Then is used the value '''palette_lenght_decompressed''' to reserve an area in memory for zlib decompression purposes (because the palette file that is going to be loaded in next step is zlib compressed), and the palette file is located by using the values '''palette_offset''' and '''palette_lenght_compressed''' | ||
After knowing all this info about an specific icon the access "jumps" back to find the palette of the icon (located at middle of imagefont.bin), so scroll up to continue reading in the section '''Palette table''' above | After knowing all this info about an specific icon the access "jumps" back to find the palette of the icon (located at middle of imagefont.bin), so scroll up to continue reading in the section '''Palette table''' above | ||
Line 383: | Line 383: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Offset !! | ! Offset !! Lenght !! Name !! Example !! Notes | ||
|- | |- | ||
| 0x00 || 0x04 || '''palette_offset''' || 00 02 3A B6 || Icon palette location | | 0x00 || 0x04 || '''palette_offset''' || 00 02 3A B6 || Icon palette location | ||
|- | |- | ||
| 0x04 || 0x02 || ''' | | 0x04 || 0x02 || '''palette_lenght_compressed''' || 03 5E || Icon palette size | ||
|- | |- | ||
| 0x06 || 0x02 || ''' | | 0x06 || 0x02 || '''palette_lenght_decompressed''' || 04 12 || Icon palette size after zlib decompression | ||
|- | |- | ||
| 0x08 || 0x02 || '''unicode_hex_id''' || F8 80 || Icon identifyer | | 0x08 || 0x02 || '''unicode_hex_id''' || F8 80 || Icon identifyer |