I'll try to tidy up and organize mM’s source code and will make it public in few weeks. There is nothing hidden there and I know a lot of coders will hate the 60 000 lines of multiman.cpp and will call-out my poor coding skills again like they did 2 years ago, but there you are.
Added support for creating ISO files from PS1 game discs
Improved support for PS1 ISO/BIN/IMG/MDF
About the PS1 improvement: I have NFS:Porsche and it works fine from disc but not from ISO/BIN. The issue was in the patched ps1_emu.self (ATAPI 0x43 READ TOC) which I believe breaks some games (like because of missing .CUE sheet processing). I hope that this fix (which is included in mM 04.19.02) will fix issues with other games that crashed or had some audio issues.
P.S. Source: Mt. Fuji Commands for Multimedia Devices Version 8: [Register or Login to view links] (page 785 / 20.21 READ CD Command)
I'm working on something with the help of @flatz which doesn't involve patching of the ps1_emu. Just like Estwald found out that the only way to properly handle all PS1 CDs is to return the correct TOC response with data about all the tracks. For this to work the manager must REQUIRE and PROCESS a CUE file with each BIN (ISO). Then intercepting some syscalls to spoof the response of some ATAPI commands and return the data from the CUE (in a similar binary format like the one Estwald posted about).
If all this is done properly it can lead to mounting ps3 iso files, too.
1) Read the CUE file and prepare proper data somewhere in LV2 memory for 0x51 and 0x43 ATAPI commands
2) Intercept syscall 604 and monitor for few ATAPI commands:
0x51: READ DISC INFORMATION
0xBE: READ CD (SECTOR)
0x43: READ TOC
0x4A: GET EVENT/STATUS
3) Return OK to all other requests, but send the prepared data for 0x51 and 0x43 and read from the BIN for 0xBE
This is oversimplified explanation, but basically this should make all PS1 discs work properly, both for ps1_emu and for ps1_netemu.
The LBA boundary after the last track is calculated using the size of the BIN and the sector size, so the CUE directive REM LEAD-OUT MM:SS:FF is not necessary.
It supports both CUE information with PREGAP included or not and FILE directive is ignored, so don't bother to manually edit your CUE files. For example here are two different variants of a CUE file for NFS, which produce the same binary payload for the ATAPI response:
3) In the patched ps1_emu.self the extended ATAPI 0x43 request is redirected to syscall37 and proper track information is returned (this version of the patched ps1 emulator is not compatible with Iris).
mM will accept ISO/BIN/MDF/IMG files with or without an accompanying CUE file. In case of no cue - mM will create a 'data-track-only' payload. For best compatibility always use CUE files with your images.
This is still a dirty way of enhancing the compatibility, but will do for now. Probably Estwald with come up with a much better solution very soon, because this one is limited to the ps1_emu.self only and multidisc games with audio tracks may have issues with the in-game CDA playback when switching to disc 2/3/4.
I'll appreciate any reports of games which had issues and now are fixed. Tested already: NFS:Porsche, NFS4, Wipeout 3, GTA:London - all work with in-game CDA audio.
multiMAN 04.19.05 minor update is available online and in the web column (CEX/DEX/STEALTH).
Added support for PS2 disc add-ons for PS3 games like SingStar:
"[PS2" prefix in folder name required
Example: /dev_hdd0/GAMES/SingStar-Dance/[PS2 Pop] where [PS2 Pop] contains a backup of your PS2 disc
You can have up to 10 [PS2] add-on discs per PS3 game. In the screenshot above (attached below) the following folder structure was used: /dev_usb000/GAMES/SingStar-Dance <--- This is the PS3 game listed in the Game column
mM detects the add-on PS2 discs and will list them in the pop-up menu when you load the game:
To have a PS2 disc to be listed in the pop-up menu the folder name must start with [PS2 like in the examples above.
[Hermes] option for BD-ROM Emulator must be used and a PS3 disc is required. Later for the PS2 swap you'll need an original PS2 disc.
Don't forget that you can backup your original PS2 discs in folder format using mmOS.
Thanks to Portnyashka for the tests and suggestions.
p.s. PS1 BIN+CUE compatibility is now improved a bit.
Also from Portnyashka: Thanks a lot Dean! I've tested several SingStar games and they work great! A few notes for someone who haven't come across SingStar games:
PS3 SingStar games allow to load contents of ps2 discs - so the things described above have little to do with actually playing ps2 games on ps3.
You'll need original PS2 disc for this to work. So in order to get songs from the ps2-disc backup you should:
1. Get any ps3 Singstar game backup and put it in /dev_hdd0/GAMES/ or /dev_usb000/GAMES/
2. Get PS2 Singstar disc backup, unpack it (from iso, bin or anything) to get a folder. Name this folder starting with "[PS2". Also you can backup a PS2 original disc in mmOS to a [PS2] folder. Put this folder inside your PS3 backup folder.
3. Load the PS3 game with MultiMan, choose PS2 addon title from the popup menu.
4. Start PS3 game either from app_home or disc icon or even XMB Singstar
5. Start a new game and select to change the disc
6. When asked, insert original PS2 disc and wait for verification to finish.
multiMAN 04.19.06 minor update is available online and in the web column.
Added support for PSXEMU/PSXNETEMU emulator selection for PS1 BIN+CUE backups (Press [Triangle] -> Game Settings)
When using PSX NETEMU option the disc backups must be in MODE1 or MODE2 / 2352 (or more) bytes sector
Multi-disc games are not supported in this initial PS1_NETEMU-support version
The default launch mode for PS1 file backups is "AUTO" = PSX EMU. Some games may require or look/perform better when using PSX NETEMU. The patched versions were tested on 4.30 and 4.21, but hopefully 3.41 and 3.55 versions will work too.
Each emulator selection is remembered per game. This method is similar to the ps1_emu.self patching and doesn't affect other apps nor uses system calls which make break other apps.
The patch is quite simple (just 244 bytes for ATAPI 0xBE READ CD command):
mM's main source file would become over 100 000 if I spend the time to follow the 'break line' rule when more than 50-60 characters are used per line and if I used comments. I started with mM as a tool for myself so I don't really care if other people can continue with it, nor I'm weary about someone adopting the code to turn it into a bigger mess. It contains about 200 lines from the original "Open Backup Manager" (which afaik was ~3000 lines) - if you wish you can start with it.
With multiMAN 05.00.00 only 4.30 and higher firmwares will be supported. Supporting 14 different firmwares is too hard to maintain compatibility with.
These will no longer be supported:
3.41 OFW + DONGLE
3.41 MFW (HERMES)
3.55 CFW KMEAW
3.55 CFW COBRA
3.55 CFW TB
3.55 CFW REBUG/ROGERO
3.55 OFW DEX
3.55 CFW DEX
4.21 OFW DEX
4.21 CFW REBUG
4.21 CFW ROGERO 1.00..2.03
These and later will be supported:
4.30 CFW ROGERO 2.05..
4.30 CFW REBUG
In the beginning mM used to support 1.90/3.00/3.14/3.21 firmwares but then suddenly the new additions started to cause issues with these old firmwares so I leveled up at 3.41. Now 2 years and 6 months later I think it is time to go up again.
Users of unsupported firmwares can stay with 04.19.00 or lower multiMAN version - anyway - it has more than everything one may need. Or switch to Iris.
Just a quick note: From the next version mM will use its own payload. No more [Hermes], [Standard], [PL3].
I coded my own payload:
It doesn't use any syscalls
It is just 252 bytes (over 5-6 times smaller than other payloads)
It doesn't overwrite any code in LV2 memory
It doesn't allocate kernel memory
It supports multiple path/files redirections
It is memory-position independent and easy to use on all firmwares
... and is 252 bytes
Update: [Register or Login to view links] (2.45 MB) - THIS IS A TEST VERSION!
It introduces the new mM payload which makes mM independent and easy to port for various firmwares
Supports only 3.55 CEX/DEX, 4.21 CEX/DEX, 4.30 CEX, 4.31 CEX
BD-ROM Emulator option in Settings can be set to "Enable / Disable" - no more "Hermes"/"Standard"
This payload overwrites 252 bytes of strings in LV2 memory (and not 4000 bytes of code like other payloads), it doesn't use syscalls and doesn't rely on firmware functions, executes fast and improves performance
Compatibility-wise it is better than "Standard" and slightly better than "Hermes".
This is another test version with the new payload.
Added option in settings "Redirect /app_home":
Disable (/app_home will not be mounted at all)
Enable (/app_home as used in previous versions - points to the game - for disc-less)
Toolbox (on Rogero firmwares with pre-installed toolbox if you play from discs only - it allows you to return to stealthMAN without restart)
IMPROVED DISC-LESS COMPATIBILITY:
The new payload allows for some tweaks and there is 80% chance that games that didn't work disc-less will now work. It is somewhat based on the DEX LAN /app_home mounting from remote PC compatibility list, which you can find here: Omnomnom's Tasty A-Z of mmDM Game-Running Tutorials
If you want real improvements please post back with FEEDBACK. For example "Alice: Madness Returns" and "Army of Two: The 40th Day" now work disc-less. Thanks to GotIt4Free for all the tests.
You can use this report_data.txt to update your stealthMAN via the toolbox as usual: