Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with mounting PS1 games with many Multi-Tracks #292

Closed
J013k opened this issue Dec 22, 2019 · 62 comments
Closed

Problem with mounting PS1 games with many Multi-Tracks #292

J013k opened this issue Dec 22, 2019 · 62 comments
Labels

Comments

@J013k
Copy link

J013k commented Dec 22, 2019

Recently I've tried to load Tomb Raider II (BIN+CUE) through webMAN MOD 1.47.25.10,
but I'm getting error and the game cannot be mounted:
https://i.postimg.cc/fWC4n5r1/TR-2.png

Game has got many tracks (61):
http://redump.org/disc/906/.

Theoretically some other games with CDDA works (Hexen, GTA).
Maybe there is a value of tracks that webMAN MOD does not support?
What about support for pregap?

Here is something interesting:
https://www.psx-place.com/threads/ps1-bin-cue-questions.26280/#post-206111,
https://www.psx-place.com/threads/whats-up-with-tomb-raider-1-2.27086/.

When I delete CUE leaving only BIN, game should at least boot:
https://www.psx-place.com/threads/multi-track-ps1-games.25263/page-6#post-216194.

The same problems seems to be also with 1st part (TR1) and Rayman.

@aldostools
Copy link
Owner

The cue parser of webMAN requires the LBA position of the track in the format: INDEX 01 mm:ss:ff

The cue files that you have mentioned, only indicate the pre-gap size INDEX 01 00:02:00 (default pregap), but not the size of the track or the initial LBA of the track as webMAN MOD expects it.

As result, all tracks are interpreted incorrectly as starting at 00:02:00 (LBA = 006075+02*75+00=150).

Try editing the CUE file using the initial LBA of each track size (use size of previous track + pregap)
e.g.
FILE "Tomb Raider II - Starring Lara Croft (Europe) (Track 01).bin" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
FILE "Tomb Raider II - Starring Lara Croft (Europe) (Track 02).bin" BINARY
TRACK 02 AUDIO
INDEX 00 00:00:00
INDEX 01 23:08:17
FILE "Tomb Raider II - Starring Lara Croft (Europe) (Track 03).bin" BINARY
TRACK 03 AUDIO
INDEX 00 00:00:00
INDEX 01 24:37:51
etc.

or use the cue file in CCD frames:
INDEX 1=104117 (103967 + 150)
INDEX 1=110826 (103967 + 150 + 6559 + 150)

@J013k
Copy link
Author

J013k commented Dec 25, 2019

I'm not sure if I follow.
Here is my CUE from ver 1.0 NTSC (something is wrong when I'm trying to add it into code):
"Tomb_Raider_2.BIN" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
TRACK 02 AUDIO
PREGAP 00:02:00
INDEX 01 23:20:44
TRACK 03 AUDIO
INDEX 00 24:46:03
INDEX 01 24:48:03
TRACK 04 AUDIO
INDEX 00 26:42:28
INDEX 01 26:44:28
TRACK 05 AUDIO
INDEX 00 29:00:13
INDEX 01 29:02:13
TRACK 06 AUDIO
INDEX 00 29:09:73
INDEX 01 29:11:73
TRACK 07 AUDIO
INDEX 00 29:18:70
INDEX 01 29:20:70
TRACK 08 AUDIO
INDEX 00 29:25:71
INDEX 01 29:27:71
TRACK 09 AUDIO
INDEX 00 29:32:73
INDEX 01 29:34:73
TRACK 10 AUDIO
INDEX 00 29:40:73
INDEX 01 29:42:73
TRACK 11 AUDIO
INDEX 00 29:54:22
INDEX 01 29:56:22
TRACK 12 AUDIO
INDEX 00 30:12:07
INDEX 01 30:14:07
TRACK 13 AUDIO
INDEX 00 30:22:45
INDEX 01 30:24:45
TRACK 14 AUDIO
INDEX 00 30:33:54
INDEX 01 30:35:54
TRACK 15 AUDIO
INDEX 00 30:40:55
INDEX 01 30:42:55
TRACK 16 AUDIO
INDEX 00 30:47:56
INDEX 01 30:49:56
TRACK 17 AUDIO
INDEX 00 30:54:58
INDEX 01 30:56:58
TRACK 18 AUDIO
INDEX 00 31:05:60
INDEX 01 31:07:60
TRACK 19 AUDIO
INDEX 00 31:12:61
INDEX 01 31:14:61
TRACK 20 AUDIO
INDEX 00 31:19:62
INDEX 01 31:21:62
TRACK 21 AUDIO
INDEX 00 31:26:63
INDEX 01 31:28:63
TRACK 22 AUDIO
INDEX 00 31:33:64
INDEX 01 31:35:64
TRACK 23 AUDIO
INDEX 00 31:40:65
INDEX 01 31:42:65
TRACK 24 AUDIO
INDEX 00 31:59:39
INDEX 01 32:01:39
TRACK 25 AUDIO
INDEX 00 32:10:40
INDEX 01 32:12:40
TRACK 26 AUDIO
INDEX 00 32:17:41
INDEX 01 32:19:41
TRACK 27 AUDIO
INDEX 00 33:11:31
INDEX 01 33:13:31
TRACK 28 AUDIO
INDEX 00 35:11:42
INDEX 01 35:13:42
TRACK 29 AUDIO
INDEX 00 37:11:25
INDEX 01 37:13:25
TRACK 30 AUDIO
INDEX 00 39:59:59
INDEX 01 40:01:59
TRACK 31 AUDIO
INDEX 00 43:05:44
INDEX 01 43:07:44
TRACK 32 AUDIO
INDEX 00 43:15:26
INDEX 01 43:17:26
TRACK 33 AUDIO
INDEX 00 43:21:74
INDEX 01 43:23:74
TRACK 34 AUDIO
INDEX 00 43:40:34
INDEX 01 43:42:34
TRACK 35 AUDIO
INDEX 00 44:36:68
INDEX 01 44:38:68
TRACK 36 AUDIO
INDEX 00 44:58:59
INDEX 01 45:00:59
TRACK 37 AUDIO
INDEX 00 47:39:53
INDEX 01 47:41:53
TRACK 38 AUDIO
INDEX 00 47:53:66
INDEX 01 47:55:66
TRACK 39 AUDIO
INDEX 00 48:07:23
INDEX 01 48:09:23
TRACK 40 AUDIO
INDEX 00 48:24:11
INDEX 01 48:26:11
TRACK 41 AUDIO
INDEX 00 48:43:74
INDEX 01 48:45:74
TRACK 42 AUDIO
INDEX 00 49:45:05
INDEX 01 49:47:05
TRACK 43 AUDIO
INDEX 00 50:20:35
INDEX 01 50:22:35
TRACK 44 AUDIO
INDEX 00 50:26:64
INDEX 01 50:28:64
TRACK 45 AUDIO
INDEX 01 50:44:63
TRACK 46 AUDIO
INDEX 00 50:54:62
INDEX 01 50:56:61
TRACK 47 AUDIO
INDEX 00 51:09:13
INDEX 01 51:11:13
TRACK 48 AUDIO
INDEX 00 51:19:46
INDEX 01 51:21:46
TRACK 49 AUDIO
INDEX 00 54:04:54
INDEX 01 54:06:54
TRACK 50 AUDIO
INDEX 00 55:18:04
INDEX 01 55:20:04
TRACK 51 AUDIO
INDEX 00 55:27:51
INDEX 01 55:29:51
TRACK 52 AUDIO
INDEX 00 56:11:59
INDEX 01 56:13:59
TRACK 53 AUDIO
INDEX 00 56:23:44
INDEX 01 56:25:44
TRACK 54 AUDIO
INDEX 00 57:14:50
INDEX 01 57:16:50
TRACK 55 AUDIO
INDEX 00 60:46:19
INDEX 01 60:48:19
TRACK 56 AUDIO
INDEX 00 64:18:01
INDEX 01 64:20:01
TRACK 57 AUDIO
INDEX 00 66:05:54
INDEX 01 66:07:54
TRACK 58 AUDIO
INDEX 00 66:31:24
INDEX 01 66:33:24
TRACK 59 AUDIO
INDEX 00 66:54:73
INDEX 01 66:56:73
TRACK 60 AUDIO
INDEX 00 67:14:52
INDEX 01 67:16:52
TRACK 61 AUDIO
INDEX 00 70:03:24
INDEX 01 70:05:24

Instead of PREGAP I need to add "INDEX 00"?
Instead of value in INDEX 00 I need to add "00:00:00"?
Something like this:

  TRACK 01 MODE2/2352
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    INDEX 00 00:00:00
    INDEX 01 23:20:44
  TRACK 03 AUDIO
    INDEX 00 00:00:00
    INDEX 01 24:48:03
  TRACK 04 AUDIO
    INDEX 00 00:00:00
    INDEX 01 26:44:28```

@aldostools
Copy link
Owner

aldostools commented Dec 25, 2019

Only PREGAP 00:02:00 and INDEX 01 mm:ss:ff are interpreted by the cue parser.

The other lines (TRACK, INDEX 00, etc.) are ignored.
Each command should be in a separated line and the cue file should end with a LF or CR character.

If PREGAP 00:02:00 is used, 150 (2*75) will be added the starting sector (LBA) of each audio track.

It seems that the LBA of each track in your cue file is not counting the previous pre-gaps.

This is how the first 4 tracks of TR2 NTSC should look... I added some REM just for clarification.
I suggest you that test with another game with less tracks until you understand how it works.

REM 00:00:00 23:20:44 105044
TRACK 01 MODE2/2352
INDEX 01 00:00:00
REM LBA=0

REM 00:02:00 01:27:34 6559
TRACK 02 AUDIO
PREGAP 00:02:00
INDEX 01 23:20:44
REM LBA=0+105044=105044
REM LBA+PREGAP=105044+150=105194

REM 00:02:00 01:56:25 8725
TRACK 03 AUDIO
INDEX 01 24:50:03
REM LBA=105194+6559=111753
REM LBA+PREGAP=111753+150=111903

REM 00:02:00 02:17:60 10335
TRACK 04 AUDIO
INDEX 01 26:48:28
REM LBA=111903+8725=120628
REM LBA+PREGAP=120628+150=120778

etc.

NOTICE: I didn't tested these values with the actual game. I only calculated them based on what the source code is expecting.

@J013k
Copy link
Author

J013k commented Dec 25, 2019

I'm not sure if I get this right.
1s = 75 ff

My brain have sproblems with sectors, so I'll need to use Length.

Leight of Track 1 = 23:20:44

Position of Track 2 = 23:20:44
Length of track 2 = 01:27:34

23:20:44 + 01:27:34 + 2 = 24:50:03

Position of Track 3 = 24:50:03
Length of track 3 = 01:56:25

24:50:03 + 01:56:25 + 2 = 26:48:28

Position of Track 4 = 26:48:28
Length of track 4 = 02:17:60

26:48:28 + 02:17:60 + 2 = 29:08:03

Position of Track 5 = 29:08:03
Length of track 5 = 00:09:60

29:08:03 + 00:09:60 + 2 = 29:19:63

Position of Track 6 = 29:19:63
Length of track 6 = 00:08:72

29:19:63 + 00:08:72 + 2 = 29:30:60

Position of Track 7 = 29:30:60
Length of track 7 = 00:07:01

29:30:60 + 00:07:01 + 2 = 29:39:61

Position of Track 8 = 29:39:61
Length of track 8 = 00:07:02

29:39:61 + 00:07:02 + 2 = 29:48:63

Position of Track 9 = 29:48:63
Length of track 9 = 00:08:00
29:48:63 + 00:08:00 + 2 = 29:58:63

Position of Track 10 = 29:58:63
Length of track 10 = 00:13:24
29:58:63 + 00:13:24 + 2 = 30:14:12

Position of Track 11 = 30:14:12...

EDIT 1:It is taking a lot of time for me to calculate it...
I need to find some kind of a mm:ss:ff calculator where 1s = 75 ff.

EDIT 2: I've found this calculator:
Part 1,
Part 2.

The mian problem is that the time do not match:
1:12:23:03 (72:23:03) vs. 70:25:03.

@aldostools
Copy link
Owner

Yes, it is a pain in the a** to calculate it manually. That's why I suggested to try with another game with less tracks.

You can use sheets.google.com to calculate the sectors.

1 frame = 1 sector
1 second = 75 sectors
1 minute = 60 * 75 sectors = 4500 sectors

In 1:12:23:03 (72:23:03), I think it should be 72:25:03 when you add the 2 seconds of pregap (not 70:25:03)

The 2 seconds are accumulative, so you should add 2 seconds (150 sectors) on each audio track.

@J013k
Copy link
Author

J013k commented Dec 25, 2019

For now I only have this problem with TR1 (57 tracks), TR2 (61 tracks) and Rayman (51 tracks).
Anyway I've edited my previous post by adding more info.

Here is most interesting part.
I've found this calculator:
Part 1,
Part 2.

The mian problem is that the time do not match:
1:12:23:03 (72:23:03) vs. 70:25:03 from redump.

In 1:12:23:03 (72:23:03), I think it should be 72:25:03 when you add the 2 seconds of pregap (not 70:25:03)

Yes I also think that the PREGAP is missing, but I don't know where to add it between
1st and 2nd track.

TRACK 01 MODE2/2352
INDEX 01 00:00:00
TRACK 02 AUDIO
PREGAP 00:02:00
INDEX 01 23:20:44

Here is missing 2s.
Leigh of Track 1 = 23:20:44
Position of Track 2 = 23:20:44
Length of track 2 = 01:27:34
23:20:44 + 01:27:34 + 2 = 24:50:03

I don't know how to make it right.

Extend 1st track to 23:22:44 from 23:20:44?

@aldostools
Copy link
Owner

I made the following spreadsheet, you can try the values in column M:
https://docs.google.com/spreadsheets/d/1OD2jHjLgBt1Sc-8wj-nMAX35NC6UMlkF5ShbXIzFRVM/edit?usp=sharing

@J013k
Copy link
Author

J013k commented Dec 26, 2019

At first there is a notification "TR2" Loaded.
Even with "new" CUE I'm getting the same error:
https://i.postimg.cc/fWC4n5r1/TR-2.png

Nothing really change.

Maybe PREGAP after all is not supported?
Maybe too many numbers of tracks are causing problems?

Here is CUE:

FILE "TR2.BIN" BINARY
  TRACK 01 MODE2/2352
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    PREGAP 00:02:00
    INDEX 01 23:20:44
  TRACK 03 AUDIO
    INDEX 01 24:50:03
  TRACK 04 AUDIO
    INDEX 01 26:48:28
  TRACK 05 AUDIO
    INDEX 01 29:08:13
  TRACK 06 AUDIO
    INDEX 01 29:19:73
  TRACK 07 AUDIO
    INDEX 01 29:30:70
  TRACK 08 AUDIO
    INDEX 01 29:39:71
  TRACK 09 AUDIO
    INDEX 01 29:48:73
  TRACK 10 AUDIO
    INDEX 01 29:58:73
  TRACK 11 AUDIO
    INDEX 01 30:14:22
  TRACK 12 AUDIO
    INDEX 01 30:34:07
  TRACK 13 AUDIO
    INDEX 01 30:46:45
  TRACK 14 AUDIO
    INDEX 01 30:59:54
  TRACK 15 AUDIO
    INDEX 01 31:08:55
  TRACK 16 AUDIO
    INDEX 01 31:17:56
  TRACK 17 AUDIO
    INDEX 01 31:26:58
  TRACK 18 AUDIO
    INDEX 01 31:39:60
  TRACK 19 AUDIO
    INDEX 01 31:48:61
  TRACK 20 AUDIO
    INDEX 01 31:57:62
  TRACK 21 AUDIO
    INDEX 01 32:06:63
  TRACK 22 AUDIO
    INDEX 01 32:15:64
  TRACK 23 AUDIO
    INDEX 01 32:24:65
  TRACK 24 AUDIO
    INDEX 01 32:45:39
  TRACK 25 AUDIO
    INDEX 01 32:58:40
  TRACK 26 AUDIO
    INDEX 01 33:07:41
  TRACK 27 AUDIO
    INDEX 01 34:03:31
  TRACK 28 AUDIO
    INDEX 01 36:05:42
  TRACK 29 AUDIO
    INDEX 01 38:07:25
  TRACK 30 AUDIO
    INDEX 01 40:57:59
  TRACK 31 AUDIO
    INDEX 01 44:05:44
  TRACK 32 AUDIO
    INDEX 01 44:17:26
  TRACK 33 AUDIO
    INDEX 01 44:25:74
  TRACK 34 AUDIO
    INDEX 01 44:46:34
  TRACK 35 AUDIO
    INDEX 01 45:44:68
  TRACK 36 AUDIO
    INDEX 01 46:08:59
  TRACK 37 AUDIO
    INDEX 01 48:51:53
  TRACK 38 AUDIO
    INDEX 01 49:07:66
  TRACK 39 AUDIO
    INDEX 01 49:23:23
  TRACK 40 AUDIO
    INDEX 01 49:42:11
  TRACK 41 AUDIO
    INDEX 01 50:03:74
  TRACK 42 AUDIO
    INDEX 01 51:07:05
  TRACK 43 AUDIO
    INDEX 01 51:44:35
  TRACK 44 AUDIO
    INDEX 01 51:52:64
  TRACK 45 AUDIO
    INDEX 01 52:10:63
  TRACK 46 AUDIO
    INDEX 01 52:24:61
  TRACK 47 AUDIO
    INDEX 01 52:41:13
  TRACK 48 AUDIO
    INDEX 01 52:53:46
  TRACK 49 AUDIO
    INDEX 01 55:40:54
  TRACK 50 AUDIO
    INDEX 01 56:56:04
  TRACK 51 AUDIO
    INDEX 01 57:07:51
  TRACK 52 AUDIO
    INDEX 01 57:53:59
  TRACK 53 AUDIO
    INDEX 01 58:07:44
  TRACK 54 AUDIO
    INDEX 01 59:00:50
  TRACK 55 AUDIO
    INDEX 01 62:34:19
  TRACK 56 AUDIO
    INDEX 01 66:08:01
  TRACK 57 AUDIO
    INDEX 01 67:57:54
  TRACK 58 AUDIO
    INDEX 01 68:25:24
  TRACK 59 AUDIO
    INDEX 01 68:50:73
  TRACK 60 AUDIO
    INDEX 01 69:12:52
  TRACK 61 AUDIO
    INDEX 01 72:03:24

@aldostools
Copy link
Owner

Unfortunately I cannot dedicate additional time to this issue (no more free time)... it requires more time testing/debugging what is really wrong.

If you decide to continue investigating, I would appreciate any feedback.

@J013k
Copy link
Author

J013k commented Dec 26, 2019

Thanks for your help so far.

For now last thing that comes to my mind is write latest CUE on the disc.
Also probably I can test few other games.

Once again thanks for your time.
Best regards.

@J013k
Copy link
Author

J013k commented Dec 26, 2019

It turns out that it was a problem with the number of tracks that webMAN MOD can support.
I mean when I reduced number of tracks into 33, webMAN MOD can load this CUE+BIN,
at least for TR2:

FILE "Tomb_Raider_2.BIN" BINARY
  TRACK 01 MODE2/2352
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    PREGAP 00:02:00
    INDEX 01 23:20:44
  TRACK 03 AUDIO
    INDEX 00 24:46:03
    INDEX 01 24:48:03
  TRACK 04 AUDIO
    INDEX 00 26:42:28
    INDEX 01 26:44:28
  TRACK 05 AUDIO
    INDEX 00 29:00:13
    INDEX 01 29:02:13
  TRACK 06 AUDIO
    INDEX 00 29:09:73
    INDEX 01 29:11:73
  TRACK 07 AUDIO
    INDEX 00 29:18:70
    INDEX 01 29:20:70
  TRACK 08 AUDIO
    INDEX 00 29:25:71
    INDEX 01 29:27:71
  TRACK 09 AUDIO
    INDEX 00 29:32:73
    INDEX 01 29:34:73
  TRACK 10 AUDIO
    INDEX 00 29:40:73
    INDEX 01 29:42:73
  TRACK 11 AUDIO
    INDEX 00 29:54:22
    INDEX 01 29:56:22
  TRACK 12 AUDIO
    INDEX 00 30:12:07
    INDEX 01 30:14:07
  TRACK 13 AUDIO
    INDEX 00 30:22:45
    INDEX 01 30:24:45
  TRACK 14 AUDIO
    INDEX 00 30:33:54
    INDEX 01 30:35:54
  TRACK 15 AUDIO
    INDEX 00 30:40:55
    INDEX 01 30:42:55
  TRACK 16 AUDIO
    INDEX 00 30:47:56
    INDEX 01 30:49:56
  TRACK 17 AUDIO
    INDEX 00 30:54:58
    INDEX 01 30:56:58
  TRACK 18 AUDIO
    INDEX 00 31:05:60
    INDEX 01 31:07:60
  TRACK 19 AUDIO
    INDEX 00 31:12:61
    INDEX 01 31:14:61
  TRACK 20 AUDIO
    INDEX 00 31:19:62
    INDEX 01 31:21:62
  TRACK 21 AUDIO
    INDEX 00 31:26:63
    INDEX 01 31:28:63
  TRACK 22 AUDIO
    INDEX 00 31:33:64
    INDEX 01 31:35:64
  TRACK 23 AUDIO
    INDEX 00 31:40:65
    INDEX 01 31:42:65
  TRACK 24 AUDIO
    INDEX 00 31:59:39
    INDEX 01 32:01:39
  TRACK 25 AUDIO
    INDEX 00 32:10:40
    INDEX 01 32:12:40
  TRACK 26 AUDIO
    INDEX 00 32:17:41
    INDEX 01 32:19:41
  TRACK 27 AUDIO
    INDEX 00 33:11:31
    INDEX 01 33:13:31
  TRACK 28 AUDIO
    INDEX 00 35:11:42
    INDEX 01 35:13:42
  TRACK 29 AUDIO
    INDEX 00 37:11:25
    INDEX 01 37:13:25
  TRACK 30 AUDIO
    INDEX 00 39:59:59
    INDEX 01 40:01:59
  TRACK 31 AUDIO
    INDEX 00 43:05:44
    INDEX 01 43:07:44
  TRACK 32 AUDIO
    INDEX 00 43:15:26
    INDEX 01 43:17:26
  TRACK 33 AUDIO
    INDEX 00 43:21:74
    INDEX 01 43:23:74

@aldostools
Copy link
Owner

Actually it is a memory limitation in Cobra. webMAN MOD allows up to 80 tracks.

@J013k
Copy link
Author

J013k commented Dec 27, 2019

Is there a place that I can report it?

Is this is the right place:
https://github.com/Evilnat/Cobra-PS3.

Or maybe this repository:
https://github.com/Joonie86/COBRA-7.3.

@aldostools
Copy link
Owner

The official is Joonie86

All the others are forks, including the one in my repo

@J013k
Copy link
Author

J013k commented Jun 6, 2020

I have notice that recently:

PSXISO with more than 32 tracks now load with 32 tracks instead of return error

Any chance to "lift" this limit or for now it cannot be done because of a memory limitation in Cobra?

@aldostools
Copy link
Owner

aldostools commented Jun 6, 2020

If I recall correctly I increased this limit some time ago and had to return it to 32 because there were other issues that I don't remember.

I made a test build with a limit of 100 like in Cobra payload, if you want to test it.
webftp_server.zip

EDIT:
Actually the current limit is 80. If your tests are successful I can change it to 100.

@J013k
Copy link
Author

J013k commented Jun 7, 2020

Are you sure that cobra supports 100 tracks:
Joonie86/COBRA-7.3#19.

There is probably no need to change limit from 80 to 100.
Game with most tracks should be Firestorm thunderhawk (78 tracks):
https://www.psx-place.com/threads/multi-track-ps1-games.25263/page-4#post-194842.

I have copied webftp_server.sprx into /dev_hdd0/plugins.
Tomb Raider 2 (61 tracks) and Rayman (51 tracks) was mounted without a problem.
The same situations was with "old" webftp_server.sprx from webMAN MOD 1.47.28...

Tomb Raider 2 still has no CDDA in main menu and I'll get BSOD after staring new game\mansion.

I'll need more time for more tests...
Thank you for your time & best regards.

@aldostools
Copy link
Owner

You can confirm it by yourself that the limit in Cobra is 99 (it returns EINVAL with 100 or more tracks)
https://github.com/Joonie86/COBRA-7.3/blob/master/486/LITE/stage2/storage_ext.c#L3015
https://github.com/Joonie86/COBRA-7.3/blob/master/486/LITE/stage2/storage_ext.c#L3442

@J013k
Copy link
Author

J013k commented Jun 7, 2020

So this change was added into 4.86 Rebug:
Joonie86/COBRA-7.3@032232a
I haven't noticed it.

Thank you once again for this piece of information.

@aldostools
Copy link
Owner

@J013k
Copy link
Author

J013k commented Jun 7, 2020

I've made few tests.

I cannot mount Tomb Raider (BIN+CUE) with:

  • webMAN_MOD_1.47.25.10
  • webMAN_MOD_1.47.26
  • webMAN_MOD_1.47.27

I'm getting this error:
https://i.postimg.cc/fWC4n5r1/TR-2.png

Mounting Tomb Raider seems to work with webMAN_MOD_1.47.28.
However I have no music (CDDA).
https://i.postimg.cc/FRt4HLSw/TR-1.png

When I patch my game image with:
https://www.psx-place.com/threads/whats-up-with-tomb-raider-1-2.27086/#post-216387.
I have music in main menu, I can start new game\mansion.
Sometimes music is missing, sometimes is getting lost...
Progress has been made.

Maybe supporting PREGAP might fix this problem, so there is no need to patch game image?

Currently my console is on Rebug 4.86.1 LITE with Cobra 8.2.

BTW It seems that there is a game that have 97 tracks:
https://www.psx-place.com/threads/multi-track-ps1-games.25263/page-6#post-245824.

@aldostools aldostools reopened this Jun 7, 2020
@aldostools
Copy link
Owner

@J013k a new update can be downloaded from Releases

It includes various updates related to this issue, like:

  • Raised limit to 98 tracks
  • Changed memory allocation for track to runtime stack memory
  • Updated Cue sheet parser in prepISO and webMAN MOD

Please use this release for future tests. Thanks again for your feedback.

@Haker120
Copy link

Haker120 commented Jun 8, 2020

I can confirm Rayman (both PAL and NTSC) mount and play just fine. I have to check Mickey's Wild Adventure.

@J013k
Copy link
Author

J013k commented Jun 8, 2020

Once again thanks for new release.

I have try few games.

  • Fighting force (27 tracks).
    I have CDDA in main menu, but unfortunately in some missions (e.g. in elevator) music is missing or it sound like "Chopped & Screwed".
    Everything is fine from disc (CD).

Here is short preview how CUE looks like:

FILE "Fighting_Force.bin" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
TRACK 02 AUDIO
PREGAP 00:02:00
INDEX 01 06:46:67
TRACK 03 AUDIO
INDEX 00 07:05:07
INDEX 01 07:07:07

  • Mortal Kombat 3 (62 tracks).
    Sorry for this, but I don't know how to properly "say it" in English:
    not all audio lines are spoken.
    E.g. there is no line "Fight" at the start of duel.
    Instead of e.g. Sub-Zero wins, I'm only getting "wins".
    All these lines are in CDDA, maybe ~2 sec gets cut.
    These problems do not happens from disc (CD).

Here is short preview how CUE looks like:

FILE "MK3.BIN" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
TRACK 02 AUDIO
PREGAP 00:02:00
INDEX 01 04:13:07
TRACK 03 AUDIO
INDEX 00 04:18:07
INDEX 01 04:20:07

  • Rayman (51 tracks).
    There is music (CDDA) in main menu, but not in all levels.
    I need to find CD of this game to be 100% if the same issue is not happening on it.

Short CUE:

FILE "Rayman.cue" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
TRACK 02 AUDIO
PREGAP 00:02:00
INDEX 01 17:15:60
TRACK 03 AUDIO
INDEX 00 17:25:10
INDEX 01 17:27:10

  • Tomb Raider (57 Tracks)
    After patching this game I have CDDA in main menu, but e.g. in mansion not all audio lines are spoken fully.

Short CUE:

FILE "Tomb Raider (Europe).bin" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
TRACK 02 AUDIO
INDEX 00 27:43:33
INDEX 01 27:45:33
TRACK 03 AUDIO
INDEX 00 31:00:01
INDEX 01 31:02:01

To sum up.
In some games first ~2 sec from CDDA is missing.
Sometimes CDDA pauses for ~200 ms, there is "click" and it resume.
Some CDDA will not play properly.

BTW There is no need to test TR 2 without any fix because the same issues are from disc,
so for now I'll leave this game.

@aldostools
Copy link
Owner

aldostools commented Jun 8, 2020

I wonder if the issue could be related to the pregap of 2 secs that is added to all the following tracks when PREGAP line is found.

You could try building a CUE file that use absolute LBA or MSF without PREGAP command.

The syntax for the absolute LBA is
INDEX 1=<LBA Value>

@aldostools
Copy link
Owner

I built this version that doesn't parse the PREGAP, so the 2 seconds are not added to INDEX 01 as the original code of webMAN does. Something interesting is that the original parser from Cobra does not process the PREGAP.

webftp_server_no_pregap.zip <- put the sprx in /dev_hdd0/plugins

If it doesn't affect other games, I think it can be the solution (without additional options).

@Haker120
Copy link

Haker120 commented Jun 8, 2020

I'm testing it. And for me it didn't help. Other games doesn't seem to be affected, Rayman has cut starting music, 2 seconds around.

@aldostools
Copy link
Owner

I'm testing it. And for me it didn't help. Other games doesn't seem to be affected, Rayman has cut starting music, 2 seconds around.

Are you using ISO from NTFS or exFAT? prepISO parses the CUE file internally, and it haven't been updated.

For the test, you must copy the ISO to FAT32 or to internal HDD.

@Haker120
Copy link

Haker120 commented Jun 8, 2020

But I don't use USB and SMB (ethernet) with my PS3. All from PSXISO on internal HDD with clean bin + cue from original games so md5 from redump matches.

@aldostools
Copy link
Owner

Please verify that the sprx with no_pregap is copied to the HDD and that /boot_plugins.txt is pointing to that file.

There is not reason for the missing 2 seconds, unless your CUE have incorrect MSF in INDEX 01

One more thing: check that the CUE file does NOT have extra spaces at the end of the INDEX 01

@aldostools
Copy link
Owner

Just in case some one need to do tests ignoring the PREGAP (that seems to be the cause of various errors), here is a version of prepISO that don't parse PREGAP like the sprx posted above.
prepISO.zip

@Haker120
Copy link

Haker120 commented Jun 8, 2020

This is my Rayman.cue

FILE "Rayman.bin" BINARY
TRACK 01 MODE2/2352
INDEX 01 00:00:00
TRACK 02 AUDIO
PREGAP 00:02:00
INDEX 01 09:15:60
TRACK 03 AUDIO
INDEX 00 09:25:10
INDEX 01 09:27:10
TRACK 04 AUDIO
INDEX 00 10:34:43
INDEX 01 10:36:43
TRACK 05 AUDIO
INDEX 00 11:41:71
INDEX 01 11:43:71
TRACK 06 AUDIO
INDEX 00 12:47:20
INDEX 01 12:49:20
TRACK 07 AUDIO
INDEX 00 13:15:42
INDEX 01 13:17:42
TRACK 08 AUDIO
INDEX 00 14:27:23
INDEX 01 14:29:23
TRACK 09 AUDIO
INDEX 00 15:28:54
INDEX 01 15:30:54
TRACK 10 AUDIO
INDEX 00 16:25:29
INDEX 01 16:27:29
TRACK 11 AUDIO
INDEX 00 17:30:26
INDEX 01 17:32:26
TRACK 12 AUDIO
INDEX 00 18:57:19
INDEX 01 18:59:19
TRACK 13 AUDIO
INDEX 00 19:59:42
INDEX 01 20:01:42
TRACK 14 AUDIO
INDEX 00 21:08:65
INDEX 01 21:10:65
TRACK 15 AUDIO
INDEX 00 22:13:23
INDEX 01 22:15:23
TRACK 16 AUDIO
INDEX 00 23:19:06
INDEX 01 23:21:06
TRACK 17 AUDIO
INDEX 00 24:27:41
INDEX 01 24:29:41
TRACK 18 AUDIO
INDEX 00 25:14:52
INDEX 01 25:16:52
TRACK 19 AUDIO
INDEX 00 26:12:40
INDEX 01 26:14:40
TRACK 20 AUDIO
INDEX 00 27:09:31
INDEX 01 27:11:31
TRACK 21 AUDIO
INDEX 00 28:15:22
INDEX 01 28:17:22
TRACK 22 AUDIO
INDEX 00 29:21:10
INDEX 01 29:23:10
TRACK 23 AUDIO
INDEX 00 30:38:12
INDEX 01 30:40:12
TRACK 24 AUDIO
INDEX 00 31:14:28
INDEX 01 31:16:28
TRACK 25 AUDIO
INDEX 00 31:50:58
INDEX 01 31:52:58
TRACK 26 AUDIO
INDEX 00 32:58:26
INDEX 01 33:00:26
TRACK 27 AUDIO
INDEX 00 34:06:09
INDEX 01 34:08:09
TRACK 28 AUDIO
INDEX 00 35:12:69
INDEX 01 35:14:69
TRACK 29 AUDIO
INDEX 00 36:23:72
INDEX 01 36:25:72
TRACK 30 AUDIO
INDEX 00 36:32:33
INDEX 01 36:34:33
TRACK 31 AUDIO
INDEX 00 36:39:53
INDEX 01 36:41:53
TRACK 32 AUDIO
INDEX 00 38:02:36
INDEX 01 38:04:36
TRACK 33 AUDIO
INDEX 00 39:09:34
INDEX 01 39:11:34
TRACK 34 AUDIO
INDEX 00 40:09:30
INDEX 01 40:11:30
TRACK 35 AUDIO
INDEX 00 41:20:59
INDEX 01 41:22:59
TRACK 36 AUDIO
INDEX 00 42:30:53
INDEX 01 42:32:53
TRACK 37 AUDIO
INDEX 00 43:35:29
INDEX 01 43:37:29
TRACK 38 AUDIO
INDEX 00 44:43:73
INDEX 01 44:45:73
TRACK 39 AUDIO
INDEX 00 45:49:63
INDEX 01 45:51:63
TRACK 40 AUDIO
INDEX 00 46:49:02
INDEX 01 46:51:02
TRACK 41 AUDIO
INDEX 00 47:36:03
INDEX 01 47:38:03
TRACK 42 AUDIO
INDEX 00 48:48:67
INDEX 01 48:50:67
TRACK 43 AUDIO
INDEX 00 49:51:74
INDEX 01 49:53:74
TRACK 44 AUDIO
INDEX 00 50:58:26
INDEX 01 51:00:26
TRACK 45 AUDIO
INDEX 00 52:07:13
INDEX 01 52:09:13
TRACK 46 AUDIO
INDEX 00 53:13:55
INDEX 01 53:15:55
TRACK 47 AUDIO
INDEX 00 54:12:09
INDEX 01 54:14:09
TRACK 48 AUDIO
INDEX 00 55:16:07
INDEX 01 55:18:07
TRACK 49 AUDIO
INDEX 00 56:18:13
INDEX 01 56:20:13
TRACK 50 AUDIO
INDEX 00 56:58:21
INDEX 01 57:00:21
TRACK 51 AUDIO
INDEX 00 57:41:47
INDEX 01 57:43:47

Also... I just replaced webftp_server.sprx to webftp_server_no_pregap.zip taking the same name.

@aldostools
Copy link
Owner

aldostools commented Jun 8, 2020

To clarify: The zip must be extracted and put the sprx inside the zip. Not rename the zip to sprx.

Same with prepISO.zip. Inside there is a PKG that should be installed to replace the current version.

@Haker120
Copy link

Haker120 commented Jun 8, 2020

I know, I replaced new webftp_server.sprx with old webftp_server.sprx, not renaming zip. Is full reboot required? I did and no luck. And I don't use prepNTFS at all.

@aldostools
Copy link
Owner

Ok, then I don't know what else could be happening.

Maybe try with multiMAN or sMAN to check if you have different results.

@Haker120
Copy link

Haker120 commented Jun 8, 2020

But Rayman or TR1/2? Rayman works fine except it cuts some off intro music when UbiSoft logo appears..

@aldostools
Copy link
Owner

Both since they don't work perfectly... Also try with both emulators (ps1_emu and ps1net_emu)

The purpose of the test is to identify if in some condition the game works as expected, to make the changes in webMAN MOD like it works in multiMAN, sMAN, IRISMAN or any other tool.

Physical CD is not an option to compare, since it's processed directly by the emu and the drive.

@J013k
Copy link
Author

J013k commented Jun 8, 2020

I built this version that doesn't parse the PREGAP, so the 2 seconds are not added to INDEX 01 as the original code of webMAN does. Something interesting is that the original parser from Cobra does not process the PREGAP.

webftp_server_no_pregap.zip <- put the sprx in /dev_hdd0/plugins

If it doesn't affect other games, I think it can be the solution (without additional options).

I have copied webftp_server.sprx into /dev_hdd0/plugins.
I have the same results as Haker120 with Rayman at Ubisoft Logo...

Let me start from beginning.

  1. From disc:
    I haven't notice any problem with:
  • Fighting force. All CDDA tracks plays nice.
  • TR after patching. All CDDA tracks plays nice. I can start new game\mansion.
    All audio lines at mansion plays fine.
  • Rayman. All CDDA tracks plays nice (even music at Ubisoft logo).
  • MK3. All CDDA tracks plays nice.
  1. webftp_server_no_pregap (CUE has got PREGAP):
  • Fighting force. Not all CDDA tracks has been played, but with this version I have
    more of them (e.g. in 1st stage cut-scene, while I can select player).
  • TR after patching. Some tracks at mansion do not plays fully.
    They stars fine but gets cut too soon (probably 2s too soon).
  • Rayman. Music at Ubisoft logo has cut starting music (2 s too late)
  • MK3. All CDDA tracks plays nice.
  1. Normal webftp_server (CUE has got PREGAP):
  • Fighting force. Not all CDDA tracks has been played, some are "Chopped & Screwed".
    No music while selecting player and at 1st cut-scene.
  • TR after patching. Some tracks at mansion do not plays fully.
    They do not start properly, like 2s was cut from them from start.
  • MK3. Some audio lines gets cut. They do not plays from beginning like in TR.
  1. With multiMAN
  • TR after patching. Audio line at mansion plays fine (there is no cut from start or at end)
  • MK3. All CDDA tracks plays nice.

Sorry for my previous report about TR.
After many test some things can get mixed up.

@aldostools I can start new thread "Help with PREGAP" at PSX-Place.
More developers maybe can help?
I do not have any developing experience, so I'm pretty useless about more suggestion to fix this issue.

@aldostools
Copy link
Owner

@J013k Yes, please create the new thread.

From your results the "no_pregap" version seems to have better results than "Normal" version.

I will commit the changes and update the release files.

If anything need to be changed, I can do it later.

@J013k
Copy link
Author

J013k commented Jun 8, 2020

Done:
https://www.psx-place.com/threads/help-with-pregap.29968/.

Yes, "no_pregap" version seems to have better results.
Unfortunately it is not perfect.
I wonder why some audio lines gets cut to soon or too late...
Is there any dependency between PREGAP and audio length?

@Haker120
Copy link

Haker120 commented Jun 9, 2020

Well, rev1 of both TR have no music in main menu and black screen after new game. Rayman seems unaffected with 2s loss with first logo.

@J013k
Copy link
Author

J013k commented Jun 9, 2020

Check the date of SLUS_001.52 in properties.
If it is from 1996-10-09 then it is v1.0.
If it is from 1996-10-24 then it is v1.1 (Rev 1).
If it is from 2000-08-11 then it is v1.6 (Rev 6).

Unfortunately v1.2 (Rev 2), v1.3 (Rev 3), v1.4 (Rev 4), v1.5 (Rev 5)
has got the same date 1998-02-11.

V1.1 (Rev 1) or later do not have CDDA in main menu and have other problems,
no matter if it it will be launched from CD or through image.

Anyway check patch for TR:
https://www.psx-place.com/threads/whats-up-with-tomb-raider-1-2.27086/#post-216387.

With PPF-o-Matic
in ISO File look for your BIN image of TR.
You may need to select all files (*.*) to be able to choose BIN.

In Patch look for Tomb Raider (USA) (v1.0).ppf (if you have v1.0).
Apply.
For 1st time try CUE from your game.
If something will be wrong try Tomb Raider (USA) (v1.0).cue (if you have v1.0) from patch archive.

@Haker120
Copy link

Haker120 commented Jun 9, 2020

Seems I have rev 0 aka v1.0, now hunting for rev 1 aka v1.1 seems to be pointless. Where is the patch fo TR2 or not needed?

@J013k
Copy link
Author

J013k commented Jun 9, 2020

Currently there is no patch for TR2.
At least I never seen it.

As with 1st Tomb Raider only v1.0 (NTSC) of TR2 will work without any problems from CD.

SLUS_004.37 should be from 1997-11-13:
http://redump.org/disc/1323/.
EXE date 1997-11-13

Other versions will not fully work, no matter if it will be launched from CD or from image.

@Haker120
Copy link

Haker120 commented Jun 9, 2020

Then PSN version? I bought NTSC one and I don't regret. ;)

@Markamiga500
Copy link

Ok, then I don't know what else could be happening.

Maybe try with multiMAN or sMAN to check if you have different results.

@aldostools , its is possible to actually start PAL PS1 games with webman and actually USE the save (in game) option to create save files on the PS3 HDD under Slot 1 / Slot 2 ??

I struggle with this issues with PAL games for years now....

Waiting for your kind answer :)

@J013k
Copy link
Author

J013k commented Jun 11, 2020

I'm not sure how this issue is related to a problem with Multi-Tracks...

To be able to save progress in PS1\PS2 games mounted by webMAN MOD,
(VMC) virtual memory card needs to be created.
You can do it in Memory Card Utility:
https://i.postimg.cc/L6ybYrmR/PS1-memory-card.png
After creating Memory Card (for PS1) assign slot for it (e.g. Slot 1):
https://i.postimg.cc/26sBKjdm/word-image-881.png

Here is how VMC will look when I will try to load save with GTA:
https://i.postimg.cc/BZjr5Swb/GTA-sav.png

Currently on Rebug 4.86.1 LITE - Cobra 8.2.

EDIT: Maybe you have this problem:
aldostools/IRISMAN#12.

@Markamiga500
Copy link

Markamiga500 commented Jun 13, 2020

@J013k : "I'm not sure how this issue is related to a problem with Multi-Tracks..."

its true , i made a twisted connection in my mind when i think about TR1-TR2 (PAL) that i try to run on CFW PS3 and i always immediatelly think about the "damn" issue i have with PAL versions trying to create save files via webMAN-MOD for years....

It work via Irisman , but I prefer using webman since its always a bit tedious to use Irisman (for me and many CFW users i know for sure)

Easy to create save files of NTSC PSX games on a NTSC console , but im still hurting my head concerning PAL PS1 games...

I would LOVE to been able to play TR1/TR2 with french audio and actually create SAVE FILES using webman mod , but it dont work (creating PAL save files on "working PS1 games) and im wondering why ?
maybe this question should be on another thread/post but i supposed i was on the right place to raise this issue on aldostools/webMAN-MOD/Issues.

Sorry im not familiar with github at all

@J013k
Copy link
Author

J013k commented Jun 13, 2020

Easy to create save files of NTSC PSX games on a NTSC console , but im still hurting my head concerning PAL PS1 games...

I would LOVE to been able to play TR1/TR2 with french audio and actually create SAVE FILES using webman mod , but it dont work (creating PAL save files on "working PS1 games) and im wondering why ?

I really don't understanding with what you have a problem?
I can create PAL save on PAL console.

I also don't understand what "create SAVE FILES using webman mod" means?
Here is my save from PAL (SLES_000.24) version of Tomb Raider made on PAL console:
http://www.mediafire.com/file/rkai6k2u6pn0cgg/Tomb_Raider_PAL_save.7z.

Did you try the patch made by @krhacken?
It also supports French version (Tomb Raider (France).ppf).
As long with:

  • German (Tomb Raider (Germany).ppf)
  • Japan (Tomb Raiders (Japan).ppf)
  • US from v1.0 up to v1.6 (Tomb Raider (USA) (v1.0).ppf...)
  • Europe (Tomb Raider (Europe).ppf)

If you want to continue discussion about Tomb Raider, you can do it here:
https://www.psx-place.com/threads/whats-up-with-tomb-raider-1-2.27086/.

You can even create new issue (e.g. Problem with creating save files using webMAN MOD),
look for:
https://i.postimg.cc/RVGwsmFs/new-issue.png
https://github.com/aldostools/webMAN-MOD/issues.

@RFNS13
Copy link

RFNS13 commented Jun 22, 2020

Hey, I've been having the same issues reported here, so i'm glad i'm not the only one at least....
So, here's the deal: PS3 super slim, 4.86 HFW/Hen 3.0.1, webman mod 1.47.28, single internal harddrive (no usb, ntfs, netserver, etc) and TR1/TR2 pal versions, converted to single bin/cue, from multiple bin files. Both of them crash/black screen after selecting new game, and no music on the main menu.
Now.. i've been using these exact same files on my retroarch build, and i've had a problem before: when i converted the game to a single bin file (i used cdmage), i had to alter some values on the generated cue, otherwise the "speech" tracks were all messed up, cutted short, out of sync, etc.
More specifically, i had to change this:

TRACK 05 AUDIO
INDEX 00 12:26:28
INDEX 01 12:28:28
TRACK 06 AUDIO
INDEX 00 14:43:38
INDEX 01 14:45:38
TRACK 07 AUDIO
INDEX 00 17:23:54
INDEX 01 17:25:54

to this:

TRACK 05 AUDIO
INDEX 00 12:26:28
INDEX 01 12:26:28
TRACK 06 AUDIO
INDEX 00 14:43:38
INDEX 01 14:43:38
TRACK 07 AUDIO
INDEX 00 17:23:54
INDEX 01 17:23:54

(match the "index 00" and "index 01" timestamps), and it perfectly solved everything!

I've tried doing the same on my PS3, but no luck... so, is this a cue file issue? Can it be fixed by further editing the file? Are the NTSC versions affected by this as well?

@J013k
Copy link
Author

J013k commented Jun 22, 2020

I'm not sure if I understand you?! https://i.postimg.cc/Kjv9pF28/zastanawia.gif

What do you mean by:

(match the "index 00" and "index 01" timestamps), and it perfectly solved everything!

After few verses:

I've tried doing the same on my PS3, but no luck... so, is this a cue file issue? Can it be fixed by further editing the file?

So is it working or not?

Anyway...
Here is a patch for Tomb Raider:
https://www.psx-place.com/threads/whats-up-with-tomb-raider-1-2.27086/#post-216387.
Here is a patch for Tomb Raider II: Starring Lara Croft:
https://www.psx-place.com/threads/whats-up-with-tomb-raider-1-2.27086/page-3#post-247738.

Here is an instruction how to apply patch:
https://www.psx-place.com/threads/whats-up-with-tomb-raider-1-2.27086/page-3#post-246664.
Example is for French version, but you can do the same thing with Europe:
Tomb Raider (Europe).ppf, Tomb Raider II - Starring Lara Croft (Europe).ppf.

@RFNS13
Copy link

RFNS13 commented Jun 22, 2020

Sorry, i didn't make myself clearer..

TRACK 05 AUDIO
INDEX 00 12: 26 :28
INDEX 01 12: 28 :28

TRACK 05 AUDIO
INDEX 00 12: 26 :28
INDEX 01 12: 26 :28

I've highlighted the changes now. Keep in mind that this is just some random .cue file, not the one for the actual games. It was just to specify what i did. And it's working flawlessly, on retroarch.
For the PS3, i'm still having the issues i described initially: no menu music and black screen when trying to start/load a game. Do those patches (and thank you for sharing them, by the way!!) solve the problems completely, or are still WIP?

@J013k J013k closed this as completed Aug 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants