PS2 wLaunchELF Release Thread

Discussion in 'PS2 Homebrew' started by sp193, May 10, 2017.

  1. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    The problem that @UniqueUserName mentioned regarding the inability to boot my SnesStation mod from LaunchELF seems to be the cause of the random boot failures for my own original pieces of software.

    Recently, I have been working on changing the design of the FMCB Installer, so that SECRMAN would work without modifications on both CEX and DEX consoles, like on the HDD Utility Disc... Well, whether that works well or not is still to be decided. However, the new binaries cannot be booted directly from LaunchELF again. This is not the first time that such a thing has happened, as @RandQalan has mentioned before (maybe not here, but on psx-scene).

    The fault cannot be replicated on a TOOL, so it may be dependent on the hardware (I am using my SCPH-77006). Replacing the homebrew MCMAN module within LaunchELF with rom0:MCMAN did allow FMCB Installer to run... But now somehow even if all the Sony (X-)modules from ROM are used, the problem still occurs. Oddly, it only happens when the FMCB Installer is packed, but the packed file can be booted indirectly from DSEDB with no problems.

    So I'm hoping that somebody will eventually find out what this is all about. I have no idea how to even start. :D
    If there is a problem with the homebrew SIO2 modules, then there should be some difference that can be obeserved through disassembly. But these modules seem quite large, so I do not feel like checking through them.

    EDIT: to clarify, my apps are usually packed with a custom packer. The algorithm is also N2E, the same one used in the normal ps2-packer lite build. However, it is the C version, which I hoped would allow me to avoid the same but that ps2-packer currently has. The load address of the packed file is 0x00100000, and it unpacks the payload to 0x00200000. Very much like official software that is packed.

    When packed with ps2-packer, the packed file can be booted from LaunchELF. @[email protected]

    Adding a breakpoint within LaunchELF's ELF loader module and immediately resuming after the breakpoint is hit, also solves the freeze on my SCPH-77006.

    There are a lot of possible factors here, which is why it is so overwhelming lol
     
    Last edited: Sep 17, 2017
    RandQalan and Berion like this.
  2. 2,260
    2,183
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,260
    Likes Received:
    2,183
    Trophy Points:
    372
    Gender:
    Male
    Location:
    rom0:/
    uLE also cannot launch applications packed by PS2TK5S packer. If this somehow could help. ;]
     
  3. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    Thanks, but I really doubt it is the packer now. I haven't heard of the PS2TK5S packer before though.

    Before I stopped work for today, I think the uncompressed version stopped working properly too.... :(
    Okay, so it's probably best to forget what I wrote above. I did find that the freeze happens when I repeatedly try to open a file on the USB disk (until it is successfully opened)... but it is not clear why it happens. I guess I may have either found a new bug in the PS2SDK or perhaps I made a mistaken when redesigning the IOP initialization stuff.

    Initializing libpad before libmc seems to make the problem disappear. The same thing happens if I add a delay before libmc is initialized. But it's all very strange because all these parts seem to be independent of each other. But okay, since it no longer seems to be a LaunchELF thing, I think I'll just leave things as they are in LaunchELF.
     
    RandQalan likes this.
  4. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    I don't know anymore. I've spent half a day trying to figure out what may be causing this weird behaviour. It goes away when I use rom0:XPADMAN instead of freepad, but that could be just a coincidence because it's loaded from ROM and not from EE RAM (which involves a lot of other factors, if it is a timing problem elsewhere). Also because I have no idea what the PADMAN module has got to do with my personal packing utility...

    I've added coloured debug screens into fileXioOpen, and the PS2 is locking up at the call to SifCallRpc. I've disabled the DMA transfers within freepad, and it doesn't seem to help. However, not calling padPortOpen seems to avoid the problem... so it may be an issue with the inner workings of freepad. But again, I have no idea why the use of my personal packing utility seems to be a factor here.

    I've tried to wait for the pad to be ready and to set the main mode, but it only works for the first boot (after quitting FMCBInstaller, booting LaunchELF and then the installer again will cause it to hang).

    So at this point, I'm perhaps willing to just concede and accept that it is some problem with my personal packing tool that I could never find. After all, it was based on ps2-packer, which still has issues to date. I did find other issues with libpadx (related to the commits in late 2016 that replace the use of arrays with structures) and other problems, but nothing that could explain the main problem was found.
     
    Berion and kozarovv like this.
  5. 1,459
    1,146
    347
    jolek

    jolek Senior Member

    Joined:
    Dec 29, 2017
    Messages:
    1,459
    Likes Received:
    1,146
    Trophy Points:
    347
    Gender:
    Male
    Due the problem from latest FMCB 1.96 with wLe (from 19\02\2018 commit: c547c5b)
    where I have problem with coping files from PS2HDD to mass,
    I've also tried wLe from automated daily builds (from 18\02\2018 commit: c547c5b):
    https://akuhak.github.io/test_build/.
    Unfortunately I have experiencing the same problem.
     
    sp193 likes this.
  6. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    Changelog for release 2018/06/12:
    • Compiled with new PS2SDK revision, to solve related issues with USB support, PFS support and network support.

    Note: there are no changes to LaunchELF's code itself.
    This is also the same version that is bundled with FMCB/FHDB v1.96, release 2018/06/12.

    USB performance has been improved on, while PFS had some issues corrected.
    With the UID/GID bug fixed within PFS, it is now possible to copy saves to the __common partition, keeping them recognized by the HDD Browser.

    Issues that are with LaunchELF itself (e.g. non-interlaced option not working), have not been addressed.

    Downloads/Links
    wLaunchELF build 2018/06/12: https://www.sendspace.com/file/p4odsy
     
    jolek, Berion and bguerville like this.
  7. 2,260
    2,183
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,260
    Likes Received:
    2,183
    Trophy Points:
    372
    Gender:
    Male
    Location:
    rom0:/
    Copied from MC? Isn't icons on HDD and icons on MC have different format?

    Once I looking (well, still I'm looking) official icon from PSBBN (silver box with dual shock symbols) and someone tell me they will not work on memory card. Is this true?
     
  8. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    Yes, but you are comparing software installations against memory card saves.
    The icons of normal saves are the same, to allow copying to the HDD.

    I do not know if it is used for the same purpose for the PSBBN, but the HDD Browser to represent folders on the __common partition, like the Your Saves folder. That icon is automatically selected and all folders in that partition will be represented with one.
    It is possible that the icon may be selectable with some special name, like the system configuration icon (_SCE8). The ROM browser may not have the icon.
     
    Berion likes this.
  9. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    I still cannot replicate this glitch. I think I may have attempted to fix this before, but it cannot be replicated.
    Have you tried copying files from a different partition? Or does it happen regardless of the partition that you copy files from?
     
  10. 2,260
    2,183
    372
    Berion

    Berion Developer

    Joined:
    Feb 3, 2015
    Messages:
    2,260
    Likes Received:
    2,183
    Trophy Points:
    372
    Gender:
    Male
    Location:
    rom0:/
    I didn't know there is difference. I never have Network Adaptor so I never try anything HDD related. :)

    So the icon I mentioned is somewhere build-in, not the real file in file system?
     
  11. 5,973
    5,660
    622
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    5,973
    Likes Received:
    5,660
    Trophy Points:
    622
    Location:
    Babylon 20xxE series
    In other thread talking about PNG i mentioned literally "PS3 doesnt supports PNG interlaced", but thats not very accurate
    What i meant is the main XMB (rendered by PSGL) doesnt supports PNG interlaced.... but inside the PS3 web browser are supported
    Are like different "enviroments"

    I guess with the PS2 and PSBBN browser could happen something similar and this is why sony was using images with different requirements for every "enviroment"
     
  12. 1,459
    1,146
    347
    jolek

    jolek Senior Member

    Joined:
    Dec 29, 2017
    Messages:
    1,459
    Likes Received:
    1,146
    Trophy Points:
    347
    Gender:
    Male
    I've checked the version from 2018/06/12 and now coping files from PS2HDD to USBHDD is working.
    Thanks.
     
  13. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    Broken 240P (non-interlaced NTSC/PAL) within LaunchELF

    I think I might have made some change that might have solved the glitch, but the video still looks 2x magnified on my TV.
    But I think my LCD TV does not support 240P, which would be why this happens.

    Could somebody who does use this function of LaunchELF, please let me know whether this feature is now working? https://www.sendspace.com/file/gwa3b2

    Thanks in advance.

    EDIT: Nevermind, I have changed my mind. After consulting Maximus32 and reviewing the old custom code that LaunchELF used, I think it used custom drawing functions for gsKit, to render the non-interlaced mode correctly.
    I would rather scrap that and implement support for DTV 480P instead, then all related hacks can be removed.

    I don't know whether it really solved the problem, however. The June 12th changes were to fix something that I broke not long before (writing to USB disk), but I think you mentioned this problem quite a long time ago...

    But either way, thanks.

    Indeed. They might have changed their specifications slightly, over time.
     
    Last edited: Jun 18, 2018
    jolek likes this.
  14. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    Changelog for build 2018/06/18:
    • Update PFS module for proper writing to the HDD unit.
    • Added proper support for booting ELFs from the HDD unit.
    • Removed defunct interlace option.
    • Added progressive video mode.
    Note: This is the same file that is bundled with FMCB v1.961. The interlace option was removed, but the control is still present in the options menu. It will do nothing, however.

    Special thanks to Maximus32 for help with the progressive video mode.

    Downloads/Links

    LaunchELF build 2018/06/18: https://www.sendspace.com/file/aeywyz
     
    7o7o, jolek, svotib and 2 others like this.
  15. 1,459
    1,146
    347
    jolek

    jolek Senior Member

    Joined:
    Dec 29, 2017
    Messages:
    1,459
    Likes Received:
    1,146
    Trophy Points:
    347
    Gender:
    Male
    @sp193 something is still ain't right.
    When I'm switching Interlace On\Off, nothing is changing (hmm, Removed defunct interlace option).
    Option after PAL (4rd) in "TV mode" gives me black screen and my TV informs me that it has switched to 480p.


    TV mode: Progressive seems to work, but the font is bigger than in PAL mode, the same thing is with TV mode: NTSC.
    I've checked 4.42d and it gives me the same effect, so probably PAL has bigger resolution (576 vs 480).
     
    Last edited: Jun 18, 2018
  16. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    Changelog for build 2018/06/19:
    • Corrected setting of display mode at boot.
    • Added missing call to padEnd(), to deinitialize PADMAN properly.
    Note: This is the same file that is bundled with FMCB v1.961 (2018/06/19). The interlace option was removed, but the control is still present in the options menu. It will do nothing, however.

    The video mode options are in this order:
    1. AUTO
    2. NTSC
    3. PAL
    4. VGA
    5. Progressive

    If your screen cannot support any of these video modes, then no video may be displayed when the unsupported video mode is selected. However, you can continue toggling the option, and video will be displayed again once a supported video mode is selected.

    I cannot reorder the options because that will change the user's settings... due to how LaunchELF is coded, unfortunately.
    (i.e. if you selected VGA, then suddenly it will become progressive, which might lead to no video being displayed)

    Downloads/Links
    LaunchELF build 2018/06/19: https://www.sendspace.com/file/c27yiu

    Yes, it is a dead option. The control was left there because it is very difficult to remove the code, without destroying anything else.

    That is VGA mode. You are experiencing what I have explained above.

    PAL has a higher vertical resolution (576 vs 480 lines), but it is still contrained to the physical dimensions of your TV. So this means that PAL pixels are flatter than NTSC and 480P pixels. So drawing 8x16 characters will look flatter under PAL, then they do under NTSC.
     
    Last edited: Jun 19, 2018
    7o7o, rocknard and jolek like this.
  17. 15
    9
    7
    7o7o

    7o7o Forum Noob

    Joined:
    Jun 15, 2018
    Messages:
    15
    Likes Received:
    9
    Trophy Points:
    7
    Hi sp193,

    I normally use uLE442d but occasionally test wLE443a and I noticed that starting ELFs with wLE just gives me a black screen, some work but most don't (from any media).

    This is with the latest wLE443a (build 2018/06/19 which came with FMCB v1.962) on a PS2 Phat with Matrix Infinity.

    BTW this is tested from a clean FMCB install on a separate MC card.

    Many thanks and best regards!
     
    Last edited: Jun 24, 2018
  18. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    But was it like that for a very long time (even with older builds), or is it a new issue?
    I have changed LaunchELF's ELF loader recently, so that might be a possibility.
     
  19. 15
    9
    7
    7o7o

    7o7o Forum Noob

    Joined:
    Jun 15, 2018
    Messages:
    15
    Likes Received:
    9
    Trophy Points:
    7
    I just tried an older version of wLE which I still had on my harddisk, this one does load the ELFs that the latest one doesn't.

    It's wLaunchELF v4.43a sun feb 18 commit: c547c5b, I got this one on june 9 (highly) probably with one of your FMCB updates.
     
  20. 710
    1,256
    222
    sp193

    sp193 Developer

    Joined:
    Oct 13, 2014
    Messages:
    710
    Likes Received:
    1,256
    Trophy Points:
    222
    Location:
    Singapore
    Home Page:
    June 9th? There was always a problem with LaunchELF, whereby it doesn't call padEnd() before it launches an ELF, which causes random boot problems as the IOP PADMAN module can inadvertently destroy data on the EE through its routine DMA transfers.
    The newest version (as of June 19th), should not have this issue.

    If you have not tried this version yet, it can be downloaded from here.
     
Tags:

Share This Page