Forum: Official MyPS2 English Forum - Official English language discussion forum for MyPS2 by NTBA2.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Thread: CONFIG.DAT CR+LF parsing bug.
  

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1 CONFIG.DAT CR+LF parsing bug. 
    dlanor is offline Member
    Join Date
    Sep 2004
    Location
    Sweden
    Posts
    10,107
    Downloads
    5
    Uploads
    0
    Mentioned
    1 Post(s)
    Tagged
    2 Thread(s)
    Likes Given
    0
    Likes Received
    126
    Many users have reported problems during the startup of myPS2 from HDD, in that the program fails to mount the partition properly. I have made a small investigation of this (by testing, not by source inspection) and found two causes for it.

    The primary cause is that the program parses the CONFIG.DAT file erroneously, recognizing only LF (0x0A) but not CR (0x0D) as terminator for the line containing the partition name. This is a bad mistake, as most people will be using a Windows-based text editor to add that line, and most such editors use CR+LF as line terminator by default.

    That is why many users report seeing an odd 'half-hidden' character after the last real character of the partition name displayed in the failure message. That odd character is simply how the display routines render the CR character, which the program has tried to use as part of the partition name.

    Even after fixing that error, the program still fails to mount that partition for use in its browsers ('My Files' etc). I suspect that this is because a mount point is already in use by the routines that allowed the CONFIG.DAT (and other myPS2 files used at startup) to be read in the first place. But that is still just a speculation on my part, and remains to be proven.

    In any case, I assume that both problems will be rather easy to fix.

    Best regards: dlanor
    Reply With Quote  

  2. #2  
    highwayman's Avatar
    highwayman is offline Registered User
    Join Date
    Mar 2005
    Posts
    13
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Good Find dlanor

    I can confirm it for me that this was the cause of the Partition mounting error -2. I saved the file in the UNIX LF format and it works now.

    Great!
    Reply With Quote  

  3. #3  
    Medieval Anubis's Avatar
    Medieval Anubis is offline Registered User
    Join Date
    Nov 2005
    Posts
    5
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Is there any program for windows that overcome this bug? I have the same -2 error.
    Reply With Quote  

  4. #4  
    darkangel84's Avatar
    darkangel84 is offline Member
    Join Date
    Aug 2004
    Posts
    40
    Downloads
    8
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    2
    Likes Received
    2
    Thanks dlanor.

    Now myPS2 works!
    Reply With Quote  

  5. #5  
    RoVeR is offline Registered User
    Join Date
    Aug 2005
    Posts
    11
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    How can I to fix the -2 error. I have only win xp on my pc.
    Reply With Quote  

  6. #6  
    highwayman's Avatar
    highwayman is offline Registered User
    Join Date
    Mar 2005
    Posts
    13
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    you can use any texteditor that supports to "save the file as" the UNIX LF Format. I have used Ultraedit32. You need to resave the CONFIG.DAT file in the UNIX format.
    Reply With Quote  

  7. #7  
    RoVeR is offline Registered User
    Join Date
    Aug 2005
    Posts
    11
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Ok, thanks so much, i´ll try that.
    Reply With Quote  

  8. #8 Exclamation Good Text Editor 
    Medieval Anubis's Avatar
    Medieval Anubis is offline Registered User
    Join Date
    Nov 2005
    Posts
    5
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Try this program. Its free and open source.

    Notepad 2

    Just go to File --> Line Endings --> and Choose "Unix (LF)"

    It seems to work for me. It gets past the partition error.

    P.S. can't someone develop a PS2 text editor? I doesn't seem it would be difficult but then again I only have a basic idea of programming in C++. Is there anyone developing one now?
    Reply With Quote  

  9. #9  
    qrange is offline Member
    Join Date
    Feb 2006
    Posts
    109
    Downloads
    4
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    2
    I'd reccomend ultraedit, its great and hex editor too
    Reply With Quote  

  10. #10  
    Zylyx is offline My Drunken Monkey-style HD-fu is best!
    Join Date
    Jul 2004
    Posts
    91
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Looks like the bug dlanor mentioned is still intact in the latest version (1.2)-- it just isn't liking being in hdd0:/__boot at all, and complains about mounting that partition (error -2) no matter what I do. I even went so far as to use nano from a linux machine to edit the config.dat file to make sure it was going to handle CR/LFs the way the program likes.
    Reply With Quote  

Page 1 of 2 1 2 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •