Skip to content

Psy-Q SDK research #142

@emoose

Description

@emoose

E: repo now links in converted Psy-Q obj files for 99% of the SDK used in SH, there's still a single .obj file from SDK that couldn't be used though.

TODO:

  • snmain.obj: seems this was built from a SNMAIN.S assembly file, there's older code available for that which matches very closely to what SH uses (LIBSN.ZIP). Sadly we can't use snmain.obj from the SDK since it uses strange relocation types which ELF doesn't support - wonder if it'd be possible to update the asm and built that into an ELF .o instead, or if we could just copy snmain.s.o from our build into the lib folder (as long as we can be sure it doesn't include any of our decomp symbols, which could change at any time)
  • .a library archives: atm we have to use a bunch of loose .o files for each SDK object, which also needs the ld script splat creates to be edited to use them - would be nicer if we could pack them into .a library file instead, but that then causes linker to start checking function references to decide which .o files from the .a should be included (and since SH uses multiple overlays, those references won't be found & a bunch of .o will be skipped), found a workaround for it but was pretty hacky, maybe there's a better way we could handle them.

There was some talk about Psy-Q on discord a while ago but it's a bit scattered, figured it's worth an issue here.

The Psy-Q they use seems a weird mix of 4.4 and 4.3 patch libs:

>printver SLUS_007.07
SLUS_007.07:    libc (1):       4.4.0.0
SLUS_007.07:    libapi (0):     4.4.0.0
SLUS_007.07:    libspu (17):    4.4.0.0
SLUS_007.07:    libetc (6):     4.4.0.0
SLUS_007.07:    libcd (4):      4.3.1.0
SLUS_007.07:    libgpu (7):     4.3.0.0

>printver BODYPROG.bin
BODYPROG.bin:   libcd (4):      0.4.8.0 (likely misidentified)
BODYPROG.bin:   libgte (9):     4.3.0.0
BODYPROG.bin:   libcard (3):    4.3.0.0
BODYPROG.bin:   libgs (8):      4.3.0.0
BODYPROG.bin:   libpad (12):    4.3.0.0

>printver STREAM.bin
STREAM.bin:     libpress (14):  4.3.0.0

libcd 4.3.1.0 was included with DTL-S2002 v2.2, inside PSX\LIB\PATCHES, but not sure why that was used instead of the 4.4 version.

Possible they might have been using some kind of incomplete-4.4-patch version that was only released online, eg:

  • Base: 4.3 SDK
  • Patch: 4.3.1 libcd
  • Patch: 4.4 libc/libapi/libspu/libetc

Hopefully the 4.4 SDK that's available will match up with those 4.4 libs, but guess we'll see.

Also possible they might have used ECOFF version of the libs too, some SDK discs included those as well as the normal PsyQ obj format, ECOFF is usually used on SGI machines which TS had been pictured using to dev the game.
(sadly the 4.3.1 patch version hasn't been found as ECOFF yet)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions