Talk:OtherOS++: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
Line 66: Line 66:


== Other values for emer_init.self MFW task ==
== Other values for emer_init.self MFW task ==
<pre>
#!/usr/bin/tclsh
#
# ps3mfw -- PS3 MFW creator
#
# Copyright (C) Anonymous Developers (Code Monkeys)
# Copyright (C) glevand ([email protected])
#
# This software is distributed under the terms of the GNU General Public
# License ("GPL") version 3, as published by the Free Software Foundation.
#
# Priority: 300
# Description: Patch emergency init
# Option --patch-emer-init-gameos-hdd-region-size-half: Create GameOS HDD region of size half of installed HDD
# Option --patch-emer-init-gameos-hdd-region-size-quarter: Create GameOS HDD region of size quarter of installed HDD
# Option --patch-emer-init-gameos-hdd-region-size-eighth: Create GameOS HDD region of size eighth of installed HDD
# Option --patch-emer-init-gameos-hdd-region-size-22gb-smaller: Create GameOS HDD region of size 22GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-10gb-smaller: Create GameOS HDD region of size 10GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-20gb-smaller: Create GameOS HDD region of size 20GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-30gb-smaller: Create GameOS HDD region of size 30GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-40gb-smaller: Create GameOS HDD region of size 40GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-50gb-smaller: Create GameOS HDD region of size 50GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-60gb-smaller: Create GameOS HDD region of size 60GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-70gb-smaller: Create GameOS HDD region of size 70GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-80gb-smaller: Create GameOS HDD region of size 80GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-90gb-smaller: Create GameOS HDD region of size 90GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-100gb-smaller: Create GameOS HDD region of size 100GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-110gb-smaller: Create GameOS HDD region of size 110GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-120gb-smaller: Create GameOS HDD region of size 120GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-130gb-smaller: Create GameOS HDD region of size 130GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-140gb-smaller: Create GameOS HDD region of size 140GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-150gb-smaller: Create GameOS HDD region of size 150GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-160gb-smaller: Create GameOS HDD region of size 160GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-170gb-smaller: Create GameOS HDD region of size 170GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-180gb-smaller: Create GameOS HDD region of size 180GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-190gb-smaller: Create GameOS HDD region of size 190GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-200gb-smaller: Create GameOS HDD region of size 200GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-210gb-smaller: Create GameOS HDD region of size 210GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-220gb-smaller: Create GameOS HDD region of size 220GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-230gb-smaller: Create GameOS HDD region of size 230GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-240gb-smaller: Create GameOS HDD region of size 240GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-250gb-smaller: Create GameOS HDD region of size 250GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-260gb-smaller: Create GameOS HDD region of size 260GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-270gb-smaller: Create GameOS HDD region of size 270GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-280gb-smaller: Create GameOS HDD region of size 280GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-290gb-smaller: Create GameOS HDD region of size 290GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-300gb-smaller: Create GameOS HDD region of size 300GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-310gb-smaller: Create GameOS HDD region of size 310GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-320gb-smaller: Create GameOS HDD region of size 320GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-330gb-smaller: Create GameOS HDD region of size 330GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-340gb-smaller: Create GameOS HDD region of size 340GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-350gb-smaller: Create GameOS HDD region of size 350GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-360gb-smaller: Create GameOS HDD region of size 360GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-370gb-smaller: Create GameOS HDD region of size 370GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-380gb-smaller: Create GameOS HDD region of size 380GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-390gb-smaller: Create GameOS HDD region of size 390GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-400gb-smaller: Create GameOS HDD region of size 400GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-410gb-smaller: Create GameOS HDD region of size 410GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-420gb-smaller: Create GameOS HDD region of size 420GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-430gb-smaller: Create GameOS HDD region of size 430GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-440gb-smaller: Create GameOS HDD region of size 440GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-450gb-smaller: Create GameOS HDD region of size 450GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-460gb-smaller: Create GameOS HDD region of size 460GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-470gb-smaller: Create GameOS HDD region of size 470GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-480gb-smaller: Create GameOS HDD region of size 480GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-490gb-smaller: Create GameOS HDD region of size 490GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-500gb-smaller: Create GameOS HDD region of size 500GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-510gb-smaller: Create GameOS HDD region of size 510GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-520gb-smaller: Create GameOS HDD region of size 520GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-530gb-smaller: Create GameOS HDD region of size 530GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-540gb-smaller: Create GameOS HDD region of size 540GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-550gb-smaller: Create GameOS HDD region of size 550GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-560gb-smaller: Create GameOS HDD region of size 560GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-570gb-smaller: Create GameOS HDD region of size 570GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-580gb-smaller: Create GameOS HDD region of size 580GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-590gb-smaller: Create GameOS HDD region of size 590GB smaller than default
# Option --patch-emer-init-gameos-hdd-region-size-600gb-smaller: Create GameOS HDD region of size 600GB smaller than default
# Option --patch-emer-init-disable-pup-search-in-game-disc: Disable searching for update packages in GAME disc.
# Type --patch-emer-init-gameos-hdd-region-size-half: boolean
# Type --patch-emer-init-gameos-hdd-region-size-quarter: boolean
# Type --patch-emer-init-gameos-hdd-region-size-eighth: boolean
# Type --patch-emer-init-gameos-hdd-region-size-22gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-10gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-20gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-30gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-40gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-50gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-60gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-70gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-80gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-90gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-100gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-110gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-120gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-130gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-140gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-150gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-160gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-170gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-180gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-190gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-200gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-210gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-220gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-230gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-240gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-250gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-260gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-270gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-280gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-290gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-300gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-310gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-320gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-330gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-340gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-350gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-360gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-370gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-380gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-390gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-400gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-410gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-420gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-430gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-440gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-450gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-460gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-470gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-480gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-490gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-500gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-510gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-520gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-530gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-540gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-550gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-560gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-570gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-580gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-590gb-smaller: boolean
# Type --patch-emer-init-gameos-hdd-region-size-600gb-smaller: boolean
# Type --patch-emer-init-disable-pup-search-in-game-disc: boolean
namespace eval ::patch_emer_init {
    array set ::patch_emer_init::options {
        --patch-emer-init-gameos-hdd-region-size-half false
        --patch-emer-init-gameos-hdd-region-size-quarter true
        --patch-emer-init-gameos-hdd-region-size-eighth false
        --patch-emer-init-gameos-hdd-region-size-22gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-10gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-20gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-30gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-40gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-50gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-60gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-70gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-80gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-90gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-100gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-110gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-120gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-130gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-140gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-150gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-160gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-170gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-180gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-190gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-200gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-210gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-220gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-230gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-240gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-250gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-260gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-270gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-280gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-290gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-300gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-310gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-320gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-330gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-340gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-350gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-360gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-370gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-380gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-390gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-400gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-410gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-420gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-430gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-440gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-450gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-460gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-470gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-480gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-490gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-500gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-510gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-520gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-530gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-540gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-550gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-560gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-570gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-580gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-590gb-smaller false
        --patch-emer-init-gameos-hdd-region-size-600gb-smaller false
        --patch-emer-init-disable-pup-search-in-game-disc false
    }
    proc main { } {
        set self "emer_init.self"
        ::modify_coreos_file $self ::patch_emer_init::patch_self
    }
    proc patch_self {self} {
        ::modify_self_file $self ::patch_emer_init::patch_elf
    }
    proc patch_elf {elf} {
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-half)} {
            log "Patching emergency init to create GameOS HDD region of size half of installed HDD"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x79\x27\xf8\x42"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-quarter)} {
            log "Patching emergency init to create GameOS HDD region of size quarter of installed HDD"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x79\x27\xf0\x82"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-eighth)} {
            log "Patching emergency init to create GameOS HDD region of size eighth of installed HDD"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x79\x27\xe8\xc2"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-22gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 22GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xfd\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-10gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 10GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xfe\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-20gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 20GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xfd\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-30gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 30GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xfc\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-40gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 40GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xfb\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-50gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 50GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xf9\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-60gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 60GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xf8\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-70gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 70GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xf7\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-80gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 80GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xf6\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-90gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 90GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xf4\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-100gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 100GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xf3\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-110gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 110GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xf2\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-120gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 120GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xf1\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-130gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 130GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xef\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-140gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 140GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xee\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-150gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 150GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xed\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-160gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 160GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xec\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-170gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 170GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xea\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-180gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 180GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xe9\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-190gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 190GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xe8\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-200gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 200GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xe7\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-210gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 210GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xe5\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-220gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 220GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xe4\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-230gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 230GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xe3\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-240gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 240GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xe2\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-250gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 250GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xe0\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-260gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 260GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xdf\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-270gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 270GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xde\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-280gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 280GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xdd\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-290gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 290GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xdb\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-300gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 300GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xda\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-310gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 310GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xd9\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-320gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 320GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xd8\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-330gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 330GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xd6\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-340gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 340GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xd5\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-350gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 350GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xd4\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-360gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 360GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xd3\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-370gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 370GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xd1\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-380gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 380GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xd0\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-390gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 390GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xcf\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-400gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 400GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xce\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-410gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 410GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xcc\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-420gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 420GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xcb\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-430gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 430GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xca\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-440gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 440GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xc9\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-450gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 450GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xc7\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-460gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 460GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xc6\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-470gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 470GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xc5\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-480gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 480GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xc4\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-490gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 490GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xc2\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-500gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 500GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xc1\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-510gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 510GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xc0\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-520gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 520GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xbf\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-530gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 530GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xbd\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-540gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 540GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xbc\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-550gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 550GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xbb\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-560gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 560GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xba\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-570gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 570GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xb8\xc0"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-580gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 580GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xb7\x80"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-590gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 590GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xb6\x40"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-gameos-hdd-region-size-600gb-smaller)} {
            log "Patching emergency init to create GameOS HDD region of size 600GB smaller than default"
            set search  "\xe9\x21\x00\xa0\x79\x4a\x00\x20\xe9\x1b\x00\x00\x38\x00\x00\x00\x7d\x26\x48\x50"
            append search "\x7d\x49\x03\xa6\x39\x40\x00\x00\x38\xe9\xff\xf8"
            set replace "\x3c\xe9\xb5\x00"
            catch_die {::patch_elf $elf $search 28 $replace} \
                "Unable to patch self [file tail $elf]"
        }
        if {$::patch_emer_init::options(--patch-emer-init-disable-pup-search-in-game-disc)} {
            log "Patching emergency init to disable searching for update packages in GAME disc"
            set search  "\x80\x01\x00\x74\x2f\x80\x00\x00\x40\x9e\x00\x14\x7f\xa3\xeb\x78"
            set replace "\x38\x00\x00\x01"
            catch_die {::patch_elf $elf $search 0 $replace} \
                "Unable to patch self [file tail $elf]"
        }
    }
}
</pre>


{|class="wikitable sortable"
{|class="wikitable sortable"
Line 1,098: Line 153:
  590GB --- 3c e9 b6 40 addis r7,r9,-18880
  590GB --- 3c e9 b6 40 addis r7,r9,-18880
  600GB --- 3c e9 b5 00 addis r7,r9,-19200
  600GB --- 3c e9 b5 00 addis r7,r9,-19200
//-->
  610GB --- 3c e9 b3 c0 addis r7,r9,-19520
  610GB --- 3c e9 b3 c0 addis r7,r9,-19520
  620GB --- 3c e9 b2 80 addis r7,r9,-19840
  620GB --- 3c e9 b2 80 addis r7,r9,-19840
Line 1,139: Line 193:
  990GB --- 3c e9 84 40 addis r7,r9,-31680
  990GB --- 3c e9 84 40 addis r7,r9,-31680
  1000GB --- 3c e9 83 00 addis r7,r9,-32000
  1000GB --- 3c e9 83 00 addis r7,r9,-32000
//-->
For task, see: http://www.ps3devwiki.com/index.php?title=PS3MFW_Builder#more_GameOS.2FOtherOS.2B.2B_sizes


== FreeBSD LiveCD ==
== FreeBSD LiveCD ==

Revision as of 08:51, 24 September 2011

OtherOS++

original wiki is here : http://wiki.gitbrew.org/ but some content is listed here for convenience because of the recent failures of that server/hosting.




Google cache Sitemap

Google cache wiki.gitbrew.org links:

main



FAQ / solutions

Getting out of Petitboot

Q: How can someone get out of Petitboot if they have a MFW without ps3hvc_hvcall patches (e.g. OtherOS++Special) and Petitboot errors @ ps3-flash-util -g (Trying Recovery Mode only gives Petitboot) ?
A1: ps3-boot-game-os will reboot onto GameOS, you can reflash petitboot from there with install_otheros.pkg
A2: Error when missing a symbolic link, use: ps3-flash-util -d /dev/ps3vflashf -g

Partition/storage regions usage

ps3d - 4 accessible regions
  ps3da : entire disk
    ps3db : UFS2 encrypted  GameOS
    ps3dc : FAT cache/temp partition, 2047 MiB (4194296)
    ps3dd : OtherOS storage region
      Example:
      ps3dd1 : 2GB swap
      ps3dd2 : Linux/FreeBSD


Other values for emer_init.self MFW task

GB replace
400 \x3c\xe9\xce\x00
22 \x3c\xe9\xfd\x40
1/8th for GameOS \x79\x27\xe8\xc2
1/4th for GameOS \x79\x27\xf0\x82
1/2 for GameOS \x79\x27\xf8\x42

Adding even more sizes

<DirtyJerz> to get the shellcode for appropriate values you need to compile addis %r7, %r9, -0x0A40 and then objdump where A40 is your size

http://pastie.org/2522641

emer_init_patch.tcl
Create GameOS HDD region of size x-GB smaller than default
By: DirtyJerz
change "set replace" values
i am not responsible for what you biff.
that is all.
    

For task, see: http://www.ps3devwiki.com/index.php?title=PS3MFW_Builder#more_GameOS.2FOtherOS.2B.2B_sizes

FreeBSD LiveCD

ps3_freebsd_livecd.iso 08-Aug-2011 17:39 342M (hardcoded 1920x1080)

mirror: ps3_freebsd_livecd.iso (341.51 MB) 08-Aug-2011 17:39 342M (hardcoded 1920x1080) MD5:3AF91272574F7D0939A6D17C7BCA92F1 / SHA1:27068E9F02F8C7F3043E26B7CE19B3DF36213B35


Mirror mirror on the wall

name mirror type md5 location
CFW355-OTHEROS++-EIGHTH-HDD-NO-SS-PATCH.PUP (170.65 MB) http://www.multiupload.com/XPJSBJQB83 Latest 7ef6c3a753c95cc9f6f4ca2cf1c4a11e ps3/cfw/latest/CFW355-OTHEROS++-EIGHTH-HDD-NO-SS-PATCH.PUP
CFW355-OTHEROS++-HALF-HDD-NO-SS-PATCH.PUP (170.65 MB) http://www.multiupload.com/LNJBEIS7T1 Latest 845b56b3b7141a841afcdb55002b27ae ps3/cfw/latest/CFW355-OTHEROS++-HALF-HDD-NO-SS-PATCH.PUP
CFW355-OTHEROS++.PUP (170.65 MB) http://www.multiupload.com/ZTBI2ZXLRH Test 1051cd182cd0790f958e181d1a9be6a8 ps3/cfw/test/CFW355-OTHEROS++.PUP
CFW355-OTHEROS++-22GB.PUP (170.65 MB) http://www.multiupload.com/10Z0IWREVD Test d6e77b49261df53913a54a693d255848 ps3/cfw/test/CFW355-OTHEROS++-22GB.PUP
CFW355-OTHEROS++-ATA-CRYPTO-OFF.PUP (170.65 MB) http://www.multiupload.com/03NN635MTR Test 8034a754d4592e0d22f54ca53f21736b ps3/cfw/test/CFW355-OTHEROS++-ATA-CRYPTO-OFF.PUP
CFW355-OTHEROS++-CRYPTO-OFF.PUP (170.65 MB) http://www.multiupload.com/3FO55L3TLV Test 37e26ec55345f8ac2413bcf8cce729d4 ps3/cfw/test/CFW355-OTHEROS++-CRYPTO-OFF.PUP
CFW341-OTHEROS++.PUP (167.12 MB) http://www.multiupload.com/JZPITOXB3H 0b9d15c917b494c4335eed7924e0cf46 ps3/cfw/CFW341-OTHEROS++.PUP
CFW355-OTHEROS++.PUP (170.64 MB) http://www.multiupload.com/SWB7MA8I75 5c8e202e2a405f3b28a6bf10db4e9c0b ps3/cfw/CFW355-OTHEROS++.PUP
CFW355-OTHEROS++-22GB.PUP (170.64 MB) http://www.multiupload.com/M9AS0XIGDL 0aed8e6a77e0a0aed8f41bcc51db3e8c ps3/cfw/CFW355-OTHEROS++-22GB.PUP
CFW355-OTHEROS++-EIGHTH-HDD-SIZE.PUP (170.64 MB) http://www.multiupload.com/ZR9CGT7H4Q 60bf74ed258f84629c75417d62227bae ps3/cfw/CFW355-OTHEROS++-EIGHTH-HDD-SIZE.PUP
CFW355-OTHEROS++-SPECIAL.PUP (170.64 MB) http://www.multiupload.com/TQINKXA4ZV e46f9cdc9b471b7bca6ced201d6f49cb ps3/cfw/CFW355-OTHEROS++-SPECIAL.PUP
PS3UPDAT.PUP (170.65 MB) http://www.multiupload.com/F8ZGOM55TU b26fbe46b637db944f7d8eb99fb54099 ps3/cfw/PS3UPDAT.PUP
README (729 Bytes) http://www.multiupload.com/MY14V8JDZ7 934a13a6a8e4215886695bc9c8caaf3b ps3/cfw/README
1deaee890be1aaf395b3dea845127454 ps3/doc/INSTALL_OTHEROS_ON_HDD
82544d74ee1e22f64ac894fb62ebef02 ps3/freebsd/config/PS3
deda855141c79092428bd4df94bcb2a9 kernel-1280x720.rar
b0309b5e29ec8ccffe17f17116b89b97 kernel-1920x1080.rar
b149a6977b73596cc2bab7d7be3341b5 kernel-720x480.rar
6e4bebf81576272af0c71129f15a6ef2 ps3/freebsd/livecd/freebsd_livecd_1280x720.iso.bz2
80ceed645d71746a365782215bba977f ps3/freebsd/livecd/freebsd_livecd_1920x1080.iso.bz2
d6bfad3ccdca38eff06328f2a9fe04ea ps3/freebsd/livecd/freebsd_livecd_720x480.iso.bz2
3af91272574f7d0939a6d17c7bca92f1 ps3/freebsd/livecd/ps3_freebsd_livecd.iso
c98ddbe9e7facfeb88de06acae124551 ps3/freebsd/loader/loader-1280x720.ps3
5d22b2f8ebaa6ad3b9c289dfe8933ebd ps3/freebsd/loader/loader-1920x1080.ps3
dbb650887c81e7b707e326a8e45c5eff ps3/freebsd/loader/loader-720x480.ps3
955765c87ed4af911e2efab9922b43dc ps3/freebsd/ps3_world.tar.gz
deb51516e44ff070e6ca2c9ebf779962 ps3/linux/ps3linux_kernel_latest.tar.gz
0b40b767cf3cdea8341a07ba6a1b579b ps3/linux/ps3rsx.tar.gz
420fdee77087333d5da010f766aa1d52 ps3/linux/ps3_usb_wlan.tar.gz
0f16158794f9650961f0c52e28f83671 ps3/petitboot/dtbImage.ps3.bin
02cc6ef50879f03dbf3dc519bc0dd299 ps3/petitboot/dtbImage.ps3.bin.minimal
05399d31c1f83d67fd1c3abbd9610a75 pkgs.rar