Retail PS2 Games with Debugging Symbols

Discussion in 'Sony Programming and Development' started by root670, May 1, 2014.

  1. root670

    root670 Robust Member

    Joined:
    Apr 4, 2010
    Messages:
    205
    Likes Received:
    17
    There are a few games out there that contain debugging symbols in their main executable file, meaning they compiled the game using the '-g' option with gcc/g++... oops! Very interesting stuff, as it makes reading the assembly code a whole lot easier.

    Off the top of my head, I know of two titles that shipped with debugging symbols:

    Crazy Taxi (uses PS2SDK 2.1.4)
    Grand Theft Auto III (uses PS2SDK 2.3.0)

    Does anyone know of others? An easy easy way to tell is by opening the game's executable (file on the root of he disk starting with SLUS/SCUS/SLPM/SLES) in IDA or ps2dis and looking for lots of named subroutines.
     
  2. horstenss

    horstenss Active Member

    Joined:
    Apr 11, 2012
    Messages:
    49
    Likes Received:
    0
    I'm not sure but try Growlanser 3.
     
  3. Delcro

    Delcro Member

    Joined:
    Mar 16, 2014
    Messages:
    10
    Likes Received:
    1
    - Resident Evil 4 (the symbols are in an unusual format not understood by IDA and PS2Dis)
    - Resident Evil Code Veronica X
    - Devil May Cry
    - Fatal Frame
    - PAL versions of ICO and Shadow of the Colossus
     
  4. sp193

    sp193 Site Soldier

    Joined:
    Mar 29, 2012
    Messages:
    2,232
    Likes Received:
    1,073
    When debugging this game today for OPL: Choujikuu Yousai Macross (SLPM-65405), built with SDK v2.5.5. Yes, it has a real runtime bug.

    The OSDSND module from the Protokernel boot ROM (SCPH-10000 and SCPH-15000) also has debugging information left over in it. This module is actually the tentative sound driver library (librspu2) that was mentioned within the SONY SDK, and was the predecessor to libsd. The funny thing is that the one in the expansion-bay boot ROMs is newer than the one that comes in the Sony PS2SDK (even in release v3.02).
     
  5. root670

    root670 Robust Member

    Joined:
    Apr 4, 2010
    Messages:
    205
    Likes Received:
    17
    Found more to add to the list:

    Xenosaga Episode I: Der Wille zur Macht (PS2SDK 2.4.2)
    Virtual Fighter 4 Evolution (Korean version, PS2SDK 2.5.5)
    Shadow Hearts (PS2SDK 2.2.2)
    Fatal Frame 2 (PS2SDK 2.8.0)

    The Suffering also appears to have debugging symbol, but almost all of them are prefixed with ".gnu.linkonce"
     
    Last edited: May 1, 2014
  6. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,894
    Likes Received:
    252
    Piposaru 2001 has debugging information in it, still.
     
  7. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,259
    Likes Received:
    92
    It's probably not a mistake. They would have used the symbols during debug and testing, but removing them could introduce problems.
     
  8. sp193

    sp193 Site Soldier

    Joined:
    Mar 29, 2012
    Messages:
    2,232
    Likes Received:
    1,073
    What do you mean by that? AFAIK, they are just debugging symbols for debuggers to use, and removing them will do nothing but save space. Compiling them without the "-g" option isn't like increasing the level of optimization.
     
  9. Sonny_Jim

    Sonny_Jim Enthusiastic Member

    Joined:
    Apr 30, 2012
    Messages:
    525
    Likes Received:
    31
    Isn't it due to the symbol enabled version being sent off for testing/certification, once that's done they can't change the codebase in anyway?
     
  10. root670

    root670 Robust Member

    Joined:
    Apr 4, 2010
    Messages:
    205
    Likes Received:
    17
    Removing a '-g' from a makefile isn't a codebase change really.
     
  11. Sonny_Jim

    Sonny_Jim Enthusiastic Member

    Joined:
    Apr 30, 2012
    Messages:
    525
    Likes Received:
    31
    Yeah wrong choice of words, but you get what I mean. Once it's been submitted for certification you can't change anything.
     
  12. root670

    root670 Robust Member

    Joined:
    Apr 4, 2010
    Messages:
    205
    Likes Received:
    17
    Found A few more games with debug symbols:

    Jak and Daxter (PS2SDK 2.2.1)
    Jak II (PS2SDK 2.7.1)

    When I was looking at these I found a GPL violation in Jak II. Take a look at "DRIVERS/OVERLORD.IRX" and you'll find routines that load and decompress assets from the disc (CGO and DGO files). These are compessed with MiniLZO, and there are several refrences to it in this file:
    lzo1x_decompress
    __lzo_copyright
    __lzo_init2
    __lzo_init_done
    /usr/home/agavin/src/jak2/libs/common/minilzo.c

    You're supposed to give credit, Andy ;). From the MiniLZO readme: "Note: you also must distribute this file ('README.LZO') with your project."
     
  13. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,894
    Likes Received:
    252
    Most likely the coder felt bad about telling people who would like to mod his game how to go about unpacking his resources. Best way to go about that was develop their own compression instead of using GPL'd code, huh ? ;)
     
  14. tehgazza

    tehgazza Rising Member

    Joined:
    Nov 11, 2012
    Messages:
    63
    Likes Received:
    2
    Lol, I wonder how many games have uncredited libs etc inside them.? Like with Hyperkin and the Retron being full of uncredited code.
     
  15. root670

    root670 Robust Member

    Joined:
    Apr 4, 2010
    Messages:
    205
    Likes Received:
    17
  16. arcadecollecting

    arcadecollecting Rising Member

    Joined:
    Aug 3, 2012
    Messages:
    66
    Likes Received:
    20
    It's a TRC violation to leave symbols in the retail elf. So retail games with them are a mistake that didn't get caught. A delicious, wonderful mistake. :)
     
    Last edited: Oct 24, 2015
  17. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,894
    Likes Received:
    252
    I think that originally it wasn't really a TRC violation. Several games from SONY owned studios released with full debug symbols on.

    A excellent example of it (even better than ICO) is Piposaru 2001 (SCPS 11014) which has a enormous (8MB) elf with full debug symbols in it.
     
  18. arcadecollecting

    arcadecollecting Rising Member

    Joined:
    Aug 3, 2012
    Messages:
    66
    Likes Received:
    20
    It seems inconsistent enough for retail games to have them that it's probably not normal for them to make it onto the retail disc. I can't say for sure if it was always a violation. I can say that it is a requirement for every submission to include them separately, so they exist for every game, somewhere. :)
     
  19. l_oliveira

    l_oliveira Officer at Arms

    Joined:
    Nov 24, 2007
    Messages:
    3,894
    Likes Received:
    252
    Well, considering the system only has 32MB of memory on the retail units, every single bit of space you can save is precious.

    Piposaru 2001 has full debug symbols on the final retail disc. But then it's a early game compiled with 2.x.x SDK. Very old stuff.

    I don't think I've ever seen a retail game with 3.x.x SDK which had symbols in it. It confirms stripping the elf being the norm later on.

    Plenty of PS2 arcade stuff have debug symbols on. IOP stuff with symbols in are quite rare on retail stuff even on older stuff because most programmers didn't bother with making their own IOP modules (only companies who designed their own middleware like Square, for example would bother with making custom IOP modules) and the ones which did had to deal with the IOP having only 2MB of memory, meaning memory was too precious to be wasted.

    But yes, arcade stuff have debug symbols in it still. lol @ Konami Python1/2 IOP modules. (Konami striped their retail PS2 modules and ELF files diligently, though. Even when it wasn't required)
     
  20. wombat

    wombat SEGA!

    Joined:
    Mar 14, 2004
    Messages:
    2,676
    Likes Received:
    323
    Is this (part of) the reason why unlicensed developers used Crazy Taxi as it's base for their discs (like swap magic, action replay and such)?
     

Share This Page