Page 1 of 8 1 2 3 ... LastLast
Results 1 to 10 of 76

Thread: GUIDE: How to recover from strange flash0/1 problems.

  
  1. #1
    over_clox is offline -Hacks Member
    Join Date
    Mar 2009
    Location
    Middle of Nowhere, Mississippi
    Posts
    299
    Rep Power
    0

    Default GUIDE: How to recover from strange flash0/1 problems.

    !!! WARNING !!! Mucking around with your PSP's internal flash memory can possibly cause it to brick. Even if you follow every instruction here to the letter, this is still a risk we all take when we open that Pandora's Box (a little pun intended) for modification. Although the goal of this process is to repair otherwise unexplainable problems and fix your PSP's flash0/1, problems you may not even really be aware of, it could just as well damage it too, especially if you're not sure what you're doing. I will not be held responsible for any damages that may arise from the (mis)use of this information. Use at your own risk. Be sure to make a backup of whatever firmware you already have working before you start changing anything.


    After running into numerous odd problems while attempting to modify my flash0 on my 3.52 M33-4 PSP Phat, I started to notice a theoretical pattern to what was causing the problems. My theory was that the firmware really doesn't like any fragmented files, and may not even like garbage in file slack space. After successfully making and testing a Pandora kit, I felt prepared to start testing different processes on flash0 to attempt to improve on my flaky PSP to which nearly all problems seemed to point to files I had changed and not to much of anything else. I was quite pleased to see that this technique not only worked, but it even fixed unexplainable bugs that had remained from previous firmwares on one of my PSPs. Before I fixed that one, I couldn't even access flash0 unless I accessed the memory stick first, otherwise my PSP would crash, and even worse the problem carried itself through multiple firmware installs of different versions (3.40OE & 3.52M33-4). After this fix, the problem is totally gone, like nothing was ever wrong with it (except the busted UMD drive, different story though).


    My complete flash0/1 setup/cleanup/backup process:

    1. Install your custom firmware and whatever updates that go along with it. Follow the author's instructions for this.
    2. If you didn't have to already, format your flash1 and configure it to your basic liking with only your primary network.
    3. Using a homebrew such as PSP Filer, backup your flash0 and flash1 into disk image files (.img) (NOT nand dumps, .bin).
    4. Using a disk imaging program like WinImage, open each image and click Image>Defragment Current Image, then save the files.
    5. Close WinImage, start recovery mode on your PSP, connect flash0/1, and reopen WinImage (just the program, no files now).
    6. In WinImage, click Disk>Restore Virtual Hard Disk image on physical drive, select your PSP from the list, and click OK.
    7. Select All Files, find your newly defragmened flash0/1 file you wish to restore, open it, and select Yes to any prompts.
    8. (Optional) You may wish to redump your flash0/1 afterwards and use these redumps as your backups. I kinda recommend it.

    That's it! If you don't feel like folloing optional step 8, you can use the defragged images made in step 4 as your backup.


    What does it do special that defrag doesn't? Since WinImage rebuilds the image file from scratch, it defrags all the files and nulls out all file slack space. Normal defragmentation has to keep all data on the volume at all times to avoid potential data loss from a power outage, and so is incapable of wiping out file slack space, plus directly defragmenting a flash volume puts undue stress on it, and it will eventually wear out if written to too much. Whether this minute null slack space detail is important to guaranteed stable operation of the PSP is still unknown to me, but it does guarantee that there is absolutely no questionable extra garbage information still remaining on the flash between the files, and that all the files are in single solid pieces. Everything else gets zeroed out and put into one contiguous block of free space, and with the extra blocks of zeros in the image file, it'll compress a couple of megabytes or so better too. I know mine did, which just proves how much extra garbage can remain from previous file contents long ago flashed over or erased.

    Of course, this process depends on being able to make a .img dump of your flash, open it on a PC, defragment it, and restore that over your current flash. That's the basic process in a nutshell. I do realize that PSP Filer only allows flash maintenance in the 1.50 kernel version, which may complicate things for slim/lite owners, but I hope that everyone is able to make good use of this information and find (or make if necessary) equivalent homebrew for the slim/lite series to generate the proper flash dumps for this process to work. Come to think of it, this also suggests the idea of a homebrew PSP flash defrag utility. I'm sure it probably never crossed anyone's mind before, but it seems very useful now, knowing now that it can actually fix problems. Everything can be done on the memory stick and in RAM before any changes are made to the real deal. I would consider making such a utility myself if I was deep into homebrew coding, but I'm not and I'm tossing the idea out in the wind to see where it blows.


    So far, I've had 100% success out of this technique, but that's only between the two phats I own right now. If this process somehow helps you out of a jam too, or you have relevant information on the slim/lite, then by all means, share your findings with the rest of the commmunity.


    BTW, here are some other various PSP hints from my experience:

    1. Do NOT format your memory stick in Windows when connected through PSP Filer, unless you want a bricked "2TB" memory stick.
    To recover from such a brick, you must format using a separate card reader because the PSP has no idea what to do with it.
    2. Do NOT charge your battery using a piece of a busted PSP motherboard, unless you want a bricked battery (trust me on this)
    Recovery: you'll need some luck, a piece of wire, and about 30 seconds of shorting the + and - battery terminals together.
    3. Avoid UCES90027.zip (Go!Edit for PSP Camera). I don't know why, but it bricked my PSP the first time I tried to use it.
    4. PSP Camera will not work on CFW 3.52M33-4 unless the default kernel is 1.50. This may hold true for other versions too.
    5. Faster 4GB or less MS Pro: backup everything, reformat with Windows from USB mode in XMB as FAT16, and restore backups.
    6. PSPWOL (Wake On Lan), contrary to the readme, does NOT need the computer's IP address, the WOL packet just uses the MAC.
    7. A PSP can be used to boot a PC from the memory stick, with the right technical skills required to set that up of course.
    8. It's really easy to turn the PSP into a crude flashlight. Just make a 480x272 solid white image and put it in your photos.
    9. If you haven't stumbled on this homebrew yet, find it and try AntiTetris. At least look it up on YouTube, you'll trip out.


  2. #2
    p0op's Avatar
    p0op is offline Senior Member -Hacks Titan
    Join Date
    Feb 2007
    Location
    Deutschland
    Posts
    9,921
    Rep Power
    22

    Default

    Interesting guide, you seem like you know what you're talking about. Although defragmenting a flash based system to me seems sort of pointless. The whole point of defragmenting a disk is to move all files closer to each other to shorten the time it takes the head on a mechanical hard drive to move from file-to-file since all the files are closer to each other as opposed to being spread out across the whole platter.

  3. #3
    over_clox is offline -Hacks Member
    Join Date
    Mar 2009
    Location
    Middle of Nowhere, Mississippi
    Posts
    299
    Rep Power
    0

    Default

    I realize the apparently pointless nature of defragmenting most any flash-based technology, but given some of the peculiar problems I've run into while modding the PSP, I figured it was worth a try. At first, I didn't even expect it to work at all, but it did (and quite well I might add), and it resolved every single odd problem that both of my PSPs had before I tried it.

    Keep in mind that flash0 was not intended to have its file contents individually changed after flashing, and normal flash installers reformat the entire volume and place all files on it sequentially, which means they're guaranteed not to be fragmented (unless modded later). Sony could have very well used this assumption of no flash file fragmentation to speed up its flash loading routines, by only locating the first sector of the file and loading the length of the file (in buffered chunks most likely) contiguously, without any regard to the actual FAT chain that keeps up with file fragments. Don't take my word on this, I don't code for Sony and I'm only assuming based on the fact that this technique worked quite well for me.

    Also keep in mind the very nature of the PSP and the lack of memory address protection that allows things like the TIFF exploit to run. When files are loaded into memory from flash, I'm sure they're not read byte-by-byte, but rather in large chunks for speed. If these chunks are fragmented and have garbage occupying the slack space, then not only does the file get loaded into memory, but so does some or all of the garbage in the slack space areas, which means that some areas of memory may have unpredictable contents from one PSP to the next when loading the exact same file. If all the slack space is nulled out, then there's no questioning what will be found in those memory addresses, all zeros, as any unused memory area should contain.

    This whole idea of flash defragmentation has nothing to do with the typical idea of speeding up mechanical disk access, but rather to clean up and optimize the contents of the firmware to be more friendly to the internals of their flash loading modules, which I'm sure only Sony, DA and a handful of others know much about the true internals of. If Sony opted to use cheap tricks like this for speed (and it wouldn't surprise me, coding is as much an art as it is science), then anything that can be done to make the data more friendly to the routines would be beneficial. I don't know EXACTLY why it seems to work so well, but being an experienced PC programmer that knows many optimization techniques, I have my theories. I don't question what works, I save the questions for what doesn't and investigate until I make it work. For the PSP, this works, trust me.

    And no, I would never recommend defragmenting any other flash-based memory, because for the most part it IS absolutely pointless and I'm already fully aware of that.

  4. #4
    over_clox is offline -Hacks Member
    Join Date
    Mar 2009
    Location
    Middle of Nowhere, Mississippi
    Posts
    299
    Rep Power
    0

    Default

    Further confirmation:

    I had on numerous occasions tried to replace 01-12.bmp on my flash0, but nearly every one of them I tried would not work, even on my "good" PSP, even right after reflashing it. It didn't matter whether I would use one somebody else made or one that I made manually (and I am fully hex/bmp literate, been programming for years before the PSP even existed, and it didn't even make sense to me why it wouldn't work). Other than sometimes the first color theme, the rest would not show up at all and using them led to a solid white background. After doing this process, now it gives me no problems whatsoever changing the file. Right now I'm using one that I made manually with a hex editor, doing exactly what I did before, and all color themes show up exactly as they should now, including my changes.

    Another similar problem I had with it was that my spare PSP would not accept the camera_plugin.rco update that disables sound #5. When I put it in, NONE of the sounds would work any more until I defragged flash0. Believe it or not people, this process works wonders. Try it if you can, you won't regret it.

  5. #5
    megazero93 is offline -Hacks Newbie
    Join Date
    Mar 2008
    Posts
    21
    Rep Power
    0

    Default

    i cant seem to make a good dump of flash0
    im using psp filer 6.0 but it fails to read that last bit
    nvm i needed to install the 1.5 kernel and then dump the flash

    is there any program that can dump the flash0 and flash1 data for a slim?
    Last edited by megazero93; 04-01-2009 at 03:09 AM.

  6. #6
    over_clox is offline -Hacks Member
    Join Date
    Mar 2009
    Location
    Middle of Nowhere, Mississippi
    Posts
    299
    Rep Power
    0

    Default

    Sorry, don't know of any homebrew that can do that on the slim yet.

    I haven't tested the 3.x kernel version of PSP Filer yet. So you say it almost works eh? I'm going to do a little more testing with mine soon, how far into it did it fail dumping, did it crash, freeze, show error, shutdown? Details?

    As far as I can tell, it seems that PSP Filer is going to be the first homebrew to be able to do it once the bugs are worked out. I'm just curious what the reliability is looking like right now. Maybe I'm wrong and there is another homebrew that does it, but I'm not aware of any.
    2 Phat PSPs: First went through hell, reassembled scrap parts from 2 bad PSPs. Second is practically new except a repaired battery clip, both running 3.52 M33-4, first clean install, second modded. No, not planning to upgrade either.

  7. #7
    Clock Work's Avatar
    Clock Work is offline -Hacks Ninja
    Join Date
    Jan 2009
    Location
    Waterbury, CT
    Posts
    631
    Rep Power
    11

    Default

    works great!!

    i used this method to re-do my flash 0, and it worked perfectly.

    the issue i wanted to remedy was: when using a cr-5400 with a fake 8gb micro the memory stick took slightly longer to load than a pro duo, occasionally the memory stick would not boot, and occasionally the psp would freeze when exiting from any random app to the xmb.

    worked perfectly thanks for the heads up it was just a lil tuff getting a "free" version of Win Image

    ========================EDIT=========================

    The id storage of a slim is encrypted so that may be why it fails, have you tried using dc8 to do the nand dump? unfortunately im not 100% sure if it will allow you to create an .ima instead of a .bin, and im also unsure whether or not you can convert the bins to ima's and vice versa.
    Last edited by Clock Work; 04-01-2009 at 12:40 PM.

  8. #8
    RainMotorsports is offline Programmer -Hacks Guru
    Join Date
    May 2008
    Posts
    2,240
    Rep Power
    16

    Default

    @Flash 0/1 Dump Restore.

    Im pretty sure NandTool 0.4 NEO can restore parts of a nand dump I havent used it in awhile but it is able to restore things like just the ipl or just a particular flash or just the keys.

  9. #9
    over_clox is offline -Hacks Member
    Join Date
    Mar 2009
    Location
    Middle of Nowhere, Mississippi
    Posts
    299
    Rep Power
    0

    Default

    See, what did I tell you? The process might sound absurd at first, but it works, doesn't it? Well, at least on the phat for now, hope someone works out the kinks for everyone else. May I suggest making this a sticky? I think a lot of people could benefit from it.
    2 Phat PSPs: First went through hell, reassembled scrap parts from 2 bad PSPs. Second is practically new except a repaired battery clip, both running 3.52 M33-4, first clean install, second modded. No, not planning to upgrade either.

  10. #10
    Omeganoah's Avatar
    Omeganoah is offline -Hacks Neophyte
    Join Date
    Jul 2008
    Posts
    58
    Rep Power
    11

    Default

    Someone NEEDS to makes this work for a slim. My brother has the 'select button problem' on his, & it's pretty much made playing games/internet for him useless. He's had to resort to playing *gulp* his DS! (XD)
    If you burned this CD, Thank you. Th-th-th-thank you.
    If you bought this CD, THANK YOU, THANK YOU, Thank You, thank you.

    -Heatbox

Page 1 of 8 1 2 3 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •