perkinsj2011 / pcsxgc

Automatically exported from code.google.com/p/pcsxgc
0 stars 0 forks source link

Bug (GUI-Core): CD-ROM ID is empty #135

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Go to LOAD ISO
2. Load a game with disc ID file (SLUS_xxx.xx, etc.) not on the root
3. Can also check the data in Show ISO Info menu. 

What is the expected output? What do you see instead?
Disc ID is empty
Region is not read

What version of CubeSX or WiiSX are you using? On what console?
WiiSX beta 2.0, 2.1

Please provide any additional information below.
Some games don't have all the system files at the root.

If the game is the first loaded one after launching WiiSX :
CD-ROM ID : empty
memory card name : .mcd (empty name)
region : NTSC

If game is loaded after another game :
CD-ROM ID : previous game CD-ROM_ID
memory card name : previous game CD-ROM_ID.mcd
Region : Previous game Region

Marl Kingdom (Rhapsody) only runs in NTSC, so if the previous game was a PAL, 
it will not work.
It's difficult to use memory card, as the name always change, and some games 
doesn't have access to memory card Slot 2.

Currently 4 games found (all from Nippon Ichi):
Rhapsody SLUS-01073
Marle Kingdom : SLPS-91415
Marle Kingdom 2 : SLPS-91414
Marle Kingdom 2+1 : SLPS-03012

File structure of Marle Kingdom 1 (Rhapsody jp):
cdrom:\MARL\SLPS_914.15
cdrom:\MARL\other game files here
cdrom:\DUMMY3M.PAD (26MB file empty of 0x00, after the header=game name)
cdrom:\system.cnf

system.cnf content:
BOOT = cdrom:\MARL\SLPS_914.15;1
TCB = 4
EVENT = 16
STACK = 801fff00

Original issue reported on code.google.com by c...@mangaheart.org on 27 Aug 2010 at 10:00

GoogleCodeExporter commented 8 years ago
I've had this happen when converting .mdf files into .iso  It could be the 
program you are using to create the images isn't creating the information 
needed by WiiSX.  Try a different program to create the image, or if you happen 
to have one, a different image file.

Original comment by thet...@gmail.com on 29 Aug 2010 at 6:56

GoogleCodeExporter commented 8 years ago
I'm using the same program for all my ISOs. All are working except games from 
Nippon Ichi Software.
The ISO (I always making .bin) are made from Original discs, and I'm almost 
sure the image format has nothing to do. But I could try another format for 
these games and report back.

I suspected the file structure, as only games with the boot file in a 
sub-folder have this problem. 

For more info : When loading the games, the CDromLabel is always correct (which 
seems to be read directly from the buffer).
I checked Misc.c function CheckCdrom(), but didn't see any problem on the 
CdromId creation. Maybe exename is not created correctly (as both Game ID and 
Region are incorrect, which depends from exename). Sorry I tried to find the 
problem, but I may not be very helpful.

Original comment by c...@mangaheart.org on 30 Aug 2010 at 10:57

GoogleCodeExporter commented 8 years ago
I think I found the error.
I've edited fileBrowserFrame to show the "exename" value when loading an ISO.
With usual working games, exename is correct :
Breath of fire IV : exename = SLES_035.52;1
Castlevania SOTN : exename = SLUS_000.61;1
etc.

With Little princess +1 (a game not working), the exename content is set on 4 
lines :
exename = cdrom:\MARL2\SLPS_030.12;1@
TCB = 4@
EVENT = 16@
STACK = 801fff00@

Yes, the exename is all that, full system.cnf, with a @ at the end of each 
lines.
same for Rhapsody, it reads all the four system.cnf lines.
I tried to trim it at the end of the first line, 
if(ptr) {
    strncpy(exename, ptr, 256); // read all lines from system.cnf
+   sscanf(exename, "%256s", exename); // trim first line only

The first line only is shown correctly now, but the ID and region are still not 
read at all.

Then I tried to replace the first letter of exename to see if I could modify 
the content to be sent to Cdromid. 
    return -1;      // SYSTEM.CNF not found
+   exename[0] = 'T';
    i = strlen(exename);

exename can't be modified if it come from the "ptr" conditional loop, but it 
can be modified without problem if exename value are from this line : 
sscanf((char*)buf+12, "BOOT = cdrom:\\%256s", exename);

So, I think it's not visible outside of the if loop, therefore the Cdromid and 
Region can't be found.

I tried few changes, but nothing worked, I thought cropping the first line 
would be enough :(
I hope it will help you debug this issue.
Sorry for the long comment, let me know if you need anything else.

Original comment by c...@mangaheart.org on 31 Aug 2010 at 5:59