Creating PS2 Multi-Game Disc With PS1 Titles

Discussion in 'Sony Programming and Development' started by PixelButts, Apr 20, 2018.

  1. sp193

    sp193 Site Soldier

    Joined:
    Mar 28, 2012
    Messages:
    2,217
    Likes Received:
    1,052
    I have already taken a look at it, hence how I knew it had no PS1DRV module.

    PS1DRV has to be obtained from a ROM image that contains it (includes ps1_rom.bin). I guess the SCPH-50000 ROM would be best because they seemed to emulate one.

    I have no such images at hand and have no time for this, unfortunately.
     
  2. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,255
    Likes Received:
    88
    PS1 & PS2 emulator for the PS3 are separate. It's very unlikely that the PS2 emulator will support switching to PS1 mode.

    However it shouldn't be amazingly complex to hack it to do something.
     
  3. sp193

    sp193 Site Soldier

    Joined:
    Mar 28, 2012
    Messages:
    2,217
    Likes Received:
    1,052
    I mean, the ROM is indeed a PS2's ROM. So surely it has to be a PS2 emulator that uses that ROM? Well, I guess a PS emulator could use it because the code at the reset vector does support the PS CPU's PRId, but I find it strange that they don't just use a normal PS ROM istead. They're 2 different binaries so it may be an indicator of two different emulators, which seems like double work... which is why I think it is likely that they got the PS2's IOP emulator to run in PS mode.

    Of course, I too find this a strange set up (why not port POPS to the console itself?).
     
  4. deba5er

    deba5er Member

    Joined:
    Mar 16, 2016
    Messages:
    20
    Likes Received:
    32
    Probably not what you want but you can create a OPL-compatible .iso with ule_wip7 with reset iop set to off, starting a radshell script running mc0 ps2psxe (not POPS) with any number of PS1 .bin/cue files on the .iso image in 8.3 naming convention over SMB. This means that I can select from uLaunchelf any one of several PS1 games which will then be started by a radshell script, all within one .iso image. POPS doesn't work with a number of PS1 games, and ps2psxe does so I recently figured this out to avoid having to use the slower USB method to run them.
     
    stayhye and pool7 like this.
  5. stayhye

    stayhye Member

    Joined:
    Oct 18, 2013
    Messages:
    21
    Likes Received:
    1
    can you go into more detail on this method? Will this work on without USB and SMB or HDD?
     
  6. deba5er

    deba5er Member

    Joined:
    Mar 16, 2016
    Messages:
    20
    Likes Received:
    32
    This is working on a Slim PS2 and FAT PS2 with OPL .iso files stored on SMB accessed over the network. OPL modes set to 3,6, and 7. uLE-wip7 needs reset iop set to off in the configuration. The uLE-wip7 elf file is renamed like SLUS_123.45 and the SYSTEM.CNF file is edited to have the line BOOT2 = cdrom0:\SLUS_123.45;1

    LAUNCHELF.CNF file is on the .iso so that it does not use the one on the memory card. To be safe, I hexedited uLE-wip7 so that the configuration file is called LAUNCHSMB.CNF, so that I wouldn't overwrite settings from my normal uLE setup. It has to be edited for the reset iop setting and also the launch buttons, titles associated with the PS1GAME ELF files.

    Radshell.elf is renamed to PS1GAME1.ELF, PS2GAME2.ELF, etc. and entries are configured in the uLE-wip7 menu to launch them. Associated PS1GAME.RSH, PS2GAME2.RSH, etc. files are created to launch ps2psxe from the memory card. It is launched from the memory card so that saves will go in the proper place. The PS1 BIOS.BIN file is placed on the .iso image, along with PS1GAME1.BIN, PS1GAME1.CUE, PS1GAME2.BIN, PS1GAME2.CUE, etc.

    The PS1GAME.RSH would look like this:
    fontsize 0.3
    border 2 2
    set prompt "$$CD>"
    set RSH_DIR "$CD"
    load IOMANX.IRX
    load FILEXIO.IRX
    load rom0:SIO2MAN
    load rom0:MCMAN
    cd mc0:/ps2psxe
    run ps2psxe.elf -nofps -32bpp -ntsc -cdimage=cdrom0:/PS1GAME.CUE -bios=cdrom0:/BIOS.BIN

    I'm pretty sure this isn't what you are looking for since you are talking about a PS4, but it certainly works on a PS2. The emulator isn't perfect, I sure wish that ffgriever would have found his lost source code.
     
    AlGollan84, stayhye and pool7 like this.
  7. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,255
    Likes Received:
    88
    I'm confused. I thought the whole point was there was a PS2 emulator but not a PS1 emulator. So a PS2 ROM makes sense, but the likelihood of it having enough to support PS1DRV out of the box is low. It's possible, but it should be possible to patch it anyway. Change the clock speed of the IOP and SPU emulations, patch in the IOP GPU DMA to go to the EE.
     
    pool7 likes this.
  8. sp193

    sp193 Site Soldier

    Joined:
    Mar 28, 2012
    Messages:
    2,217
    Likes Received:
    1,052
    I was referring to the PS3. Do we know for sure that the PS emulator is really only a PS emulator?
    At least one version of its PS emulator uses a PS2's ROM, which is a SCPH-50000 series ROM. Complete with PS1DRV, unlike its PS2 emulator counterpart. I just haven't disassembled its OSDSYS program because it is packed and I have no access to my usual tools for these few weeks.

    So what I think is that the Sony PS2 emulator can emulate a PS. It's just whether there is the necessary code for selecting the PS mode is present.
    If this is true, then PS emulation might be already possible on even the PS4. Just that the missing parts of the PS-compatibility system has to be added.

    But well, I never took a deep dive into the world of PlayStation 3 reverse engineering, so it is possible that it doesn't actually work like that. Personally, I find it really strange that they would have an emulator within an emulator anyway...
    I'm mentioning this, in case nobody has actually taken a look at it. I would spend the time to do my own homework to see if it was already done, but I've been really busy these few days.

    Does it make more sense now? Yes, you're right to say that it is all very strange.
     
    Last edited: Apr 28, 2018
    pool7 likes this.
  9. wisi

    wisi Rising Member

    Joined:
    Apr 16, 2016
    Messages:
    53
    Likes Received:
    75
    When run in PCSX2, the BIOS/BOOT ROM from the PS1 emulator from 1.02 PS3 FW, does visibly have a standard, fully-functional PS2 OSDSYS program. I think it is more likely they are emulating a PS2 switched to PS1 mode, because for the early PS3 versions that did have most of the PS2 hardware it would have made more sense to use it.
    BTW, (not-so) recent discoveries in how DECKARD functions showed that DECKARD itself is neither emulating the actual IOP MIPS core nor the GTE core. Instead a dedicated APU is used, connected to the PPC core, that "emulates" the instructions in hardware. the DECKARD code only passes the instructions and data to it: http://psx-scene.com/forums/f19/deckard-ppc-iop-discussion-157416/index2.html#post1216607
    It is very likely that the IOP in the early PS3 versions is not emulated, but rather it is (a different?) PPC core, but with the same APU doing the emulation of the MIPS and GTE. So the early PS3 versions may not be so different from the PS2 DECKARD models (this is only a speculation though).
    Maybe looking in the PS3 emulators of the PS2 would give more ideas.
     
    pool7 and svotib like this.
  10. sp193

    sp193 Site Soldier

    Joined:
    Mar 28, 2012
    Messages:
    2,217
    Likes Received:
    1,052
    If it is a standard OSDSYS program, then did the PS3 show the PlayStation 2 boot screen? If the emulated console was already in PS mode, then it is not possible for OSDSYS to boot because the SIFRPC services would not be available, and hence OSDSYS cannot be loaded.

    In case its kernel was a custom one, I did check if KERNEL boots PS1DRV directly, but no... it boots OSDSYS.

    Based on this table, the ps1_rom.bin image was replaced at firmware v4.00. I've found that file and it only contains files like... TBIN, SBIN, RESET. So it was then used for only the IOP.
    This may be an indicator that they provided the ROM image for only the IOP, not the EE. Which also probably means that this is not even a standard PS2 emulator being used for PS mode. :(

    IOPBOOT is missing, so the IOP cannot run in IOP mode. KERNEL is missing, so no EE will boot with this. Only TBIN is present, so the IOP can only operate in PS compatibility mode.

    So you're probably right; it's emulating an IOP already in PS mode, perhaps coupled to a natively-emulated GPU.
    Oh well, I guess it would have been too easy if we could do PS emulation within the PS2 emulator...

    The ROM has no DECKARD though, but I think we can establish that a real IOP device wasn't present because no such thing was found.
     
    pool7 likes this.
  11. wisi

    wisi Rising Member

    Joined:
    Apr 16, 2016
    Messages:
    53
    Likes Received:
    75
    It wouldn't have been the same or even similar chip, but I meant it may have used part of the PPC-IOP's hardware and that is how the IOP and GTE cores might have been emulated. This can be confirmed from the emulator's code. I think it is a likely possibility. It wouldn't have made the ASIC this was integrated in much larger, as the main ASIC of the late PSTwo models is relatively small and it contains almost everything of the PS2 but the GPU and CDVD DSP.
    I looked at the PS3 ps1emu code, but it is very long and I can't find anything recognizable.
    But based on your findings it does make sense that this may have been a PS1-only emulator (given that the later versions are such).
    In fact, there is a way to check that: if one of the PS3's PPC cores has an APU, this might be the same APU the PPC-IOP has.
     
    AKuHAK and AlGollan84 like this.
  12. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,255
    Likes Received:
    88
    I haven't personally looked. I interviewed at Sony in the run up to the PS3 launch for working on PS1 compatibility fixes.

    They told me that the PS1 emulation on PS3 was separate from the PS2 backward compatibility to avoid multiple levels of emulation. They also said that the same code could be compiled to run on a PC. I asked if it was related to Virtual Game Station that they had bought from Connectix and as far as I remember they said it was.

    I don't know if he lied, was mistaken about it or if my memory has failed.

    If you're talking about the PS4 then I reckon it will be doable with a hacked executable. The amount of effort might be higher than just porting another emulator, but it would be far cooler. First step will be to make it run a standard BIOS, boot discs, freemcboot etc.

    On the PS3 backward compatible models I believe the IOP in the PS2 is completely software emulated, the hard part will be figuring out if/how the GPU dma could be hooked up to the EE so that it can emulate the GPU.
     
    Last edited: May 2, 2018
    AKuHAK, stayhye and pool7 like this.
  13. sp193

    sp193 Site Soldier

    Joined:
    Mar 28, 2012
    Messages:
    2,217
    Likes Received:
    1,052
    Well, he might have been right. Given that things do not make sense with a full PlayStation 2 boot ROM, it had to be a partial emulator that only emulated the IOP.

    As of v4.00, the EE kernel was removed, so emulation could not have ever depended on the EE, hence I now doubt it was a PS2 emulator that emulated the PS .

    I was originally just going with the assumption that the PS2 emulator would be functionally similar on both PS3 and PS4 consoles. That was before I realized that the ROM probably was not used for the PS compatible mode of the PS2, however .
     
  14. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,255
    Likes Received:
    88
    The code might have at some point been part of a PS2 emulator, but stripped down after that was realised to be a stupid way of doing it.

    PS3 development was in the wilderness for a long time. They only got a GPU pretty late on, the rendering was originally going to be done with the SPE's.

    Maybe they originally had a PS2 IOP in there.
     
  15. stayhye

    stayhye Member

    Joined:
    Oct 18, 2013
    Messages:
    21
    Likes Received:
    1
    ...so basically before this thread gets buried in technical jargon and what-not, the answer is NO to a ps2 disc comprised of ps1 games unless you can code one yourself. It is possible for the ones who can talk about all the technicalities of the internals. But, for us regular folks....no.
     
  16. sp193

    sp193 Site Soldier

    Joined:
    Mar 28, 2012
    Messages:
    2,217
    Likes Received:
    1,052
    Personally, I do not see why it isn't impossible.

    Actually, no. To boot a disc in PS mode, you would need to boot PS1DRV from a PS2 program. AFAIK, no game will do this because it isn't a way to boot a specific ELF - since the ROM for the PS would still boot whatever that is in SYSTEM.CNF (you can't specify what to boot).

    Anyway, it probably won't even work that way, since the "PS emulator" doesn't seem to emulate a PS2, and so you can't emulate a PS game with this.
    It might have always been a standalone PS emulator that they used for PS games, maybe even one that emulated nothing more than a PS.
     
  17. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,255
    Likes Received:
    88
    It's not at all easy to do what you want.

    To be able to run multiple PS1 games without having to rewrite them you would want to store ISO's on the DVD, because some games are hard coded to load data from specific parts of the disc rather than look at the file system or they have their own file system parsing routines which are probably limited to CD sized discs.
     
    DeChief likes this.
  18. stayhye

    stayhye Member

    Joined:
    Oct 18, 2013
    Messages:
    21
    Likes Received:
    1
    So what is preventing a DVD version of Popstarter from accomplishing this? I don't know how it works, but that would seem like the way to go..
     
  19. sp193

    sp193 Site Soldier

    Joined:
    Mar 28, 2012
    Messages:
    2,217
    Likes Received:
    1,052
    The question is, does POPStarter support the CD/DVD drive? If it does, then does POPS? Here, the problem is a little different; the IOP kernel does provide the necessary modules for supporting the CD/DVD drive, but the paths are a little different (compared to most other devices):
    • Must be in uppercase.
    • Files must have the version suffix (";1").

    But it certainly is a way to do it since the PS4 has a functional PS2 emulator, if there is no way to build and run PlayStation 4 homebrew.
     
    stayhye and pool7 like this.
  20. kHn

    kHn Rising Member

    Joined:
    Oct 11, 2017
    Messages:
    56
    Likes Received:
    189
    Although POPStarter allows POPS to emulate PS1 games from physical discs, POPStarter's design is limited to reading the emulator (POPS binaries) files from USB mass, internal HDD, and SMB. It means that if you author a hybrid PS-X/PS2 disc with the POPStarter ELF inside, it is still required to store resource files somewhere else.
    Also, the file source device (USB/HDD/SMB) is accessed according to the POPStarter ELF prefix, and the ELF prefix just violates the 8.3 DOS standard.

    Yeah, POPS does read discs. As long as they're mode 2 CDROMs (can be PS1CD, PS1CDDA, PS2CD, PS2CDDA, does not matter), POPS can run them. A new launcher would have to be coded, since POPStarter wants POPS to be in USB/HDD/SMB. The compatibility is worse than with disc images (aka VCD) tho.
     
    sp193 and pool7 like this.
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page