PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.52k stars 1.6k forks source link

[Feature Request]: some chinese convert version ISO can't play on pcsx2 but ps2 can play. "Illegal ELF file size over 2GB!" #6098

Closed kokutoukiritsugu closed 2 years ago

kokutoukiritsugu commented 2 years ago

Description

This is a Chinese version of the iso image, It can be played on the physical machine, but the pcsx2 emulator cannot play. Tried 1.6, 1.7, latest version

Can I post a mega.nz iso link here?

1.6 load iso log:

Loading plugins from D:\games\games\emu\ps2\pcsx2 1.6\plugins...
    Bound   GS: GSdx32-AVX2.dll [GSdx 20200506140834 (MSVC 19.25 AVX2/AVX2) 1.2.0]
    Bound  PAD: LilyPad.dll [LilyPad (20200506140834) 0.12.1]
    Bound SPU2: Spu2-X.dll [SPU2-X 20200506140834 2.0.0]
(GameDB) 9858 games on record (loaded in 95ms)
    Bound CDVD: cdvdGigaherz.dll [cdvdGigaherz 20200506140834 0.11.0]
    Bound  USB: USBnull.dll [USBnull Driver 20200506140834 0.7.0]
    Bound   FW: FWnull.dll [FWnull Driver 20200506140834 0.7.0]
    Bound DEV9: DEV9null.dll [DEV9null Driver 20200506140834 0.5.0]
Plugins loaded successfully.

HLE Notice: ELF does not have a path.

Initializing plugins...
    Init GS
    Init PAD
    Init SPU2
    Init CDVD
    Init USB
    Init FW
    Init DEV9
Plugins initialized successfully.

Patches: No CRC found, using 00000000 instead.
Opening plugins...
    Opening GS
    Opening PAD
    Opening SPU2
Current Renderer: Direct3D 11 (Hardware renderer)
    Opening CDVD
isoFile open ok: D:\games\games\emu\ps2\恶魔城:暗黑的诅咒[中文].iso
    Image type  = DVD
 * CDVD Disk Open: DVD, Single layer or unknown:
 * * Track 1: Data (Mode 1) (4122352 sectors)
    Opening USB
    Opening FW
    Opening DEV9
GSdx Lookup CRC:0
McdSlot 0 [File]: [is not memcard file]
McdSlot 1 [File]: D:\games\games\emu\ps2\pcsx2 1.6\memcards\Mcd002.ps2
McdSlot 0: [Folder] D:\games\games\emu\ps2\pcsx2 1.6\memcards\Mcd001.ps2
GSdx Lookup CRC:0
(FolderMcd) Indexing slot 0 with filter "".
Plugins opened successfully.
EE/iR5900-32 Recompiler Reset
    Bios Found: Europe  v01.20(02/09/2000)  Console
# Initialize memory (rev:3.42, ctm:393Mhz, cpuclk:295Mhz )

PlayStation 2 ======== Hard reset boot
 ROMGEN=2000-0902, IOP info (CPUID=1f, CACH_CONFIG=0, 2MB, IOP mode)
 <20000902-234321,ROMconf,PS20120EC20000902.bin:11536>
# Total accessable memory size: 32 MB (B:2:8:0) (342:2:7c30)
# TLB spad=0 kernel=1:12 default=13:30 extended=31:38
# Initialize Start.
# Initialize GS ...
# Initialize INTC ...
# Initialize TIMER ...
# Initialize DMAC ...
# Initialize VU1 ...
# Initialize VIF1 ...
# Initialize GIF ...
# Initialize VU0 ...
# Initialize VIF0 ...
# Initialize IPU ...
# Initialize FPU ...
# Initialize User Memory ...
LilyPad: Warning! No controls are bound to a currently attached device!
Please attach a controller that has been setup for use with LilyPad or go to the Plugin settings and setup new controls.
# Initialize Scratch Pad ...
# Initialize Done.

EE DECI2 Manager version 0.06 May 11 2000 18:08:48
  CPUID=2e20, BoardID=0, ROMGEN=2000-0902, 32M

Patches: No CRC found, using 00000000 instead.
(SYSTEM.CNF) Detected PS2 Disc = cdrom0:\SLPM_661.75;1
(SYSTEM.CNF) Software version = 1.03
(SYSTEM.CNF) Disc region type = NTSC
Closing plugins...
    Closing DEV9
    Closing FW
    Closing USB
    Closing CDVD
    Closing SPU2
    Closing PAD
    Closing GS
Plugins closed successfully.
Shutting down plugins...
Plugins shutdown successfully.
Path: cdrom0:\SLPM_661.75;1
(pxActionEvent) Illegal ELF file size over 2GB!(thread:EE Core)

Reason

emmm... make pcsx2 batter.

Examples

no

kokutoukiritsugu commented 2 years ago

if remove this check, the emulator can play the iso, but load time longer then other game. and the game folder scan not crash too,but scan to the "problem file" will stuck 2-5s.

https://github.com/PCSX2/pcsx2/blob/7c9493cbc2ac15d8cf81af0f4142e0d9c8213ca8/pcsx2/Elfheader.cpp#L188

i use x64dbg Snipaste_2022-05-19_21-02-09

Snipaste_2022-05-19_21-09-13

Mrlinkwii commented 2 years ago

can you post a log from a 1.7 nightly build

kokutoukiritsugu commented 2 years ago

it just crash. image

use x64dbg, show same error(elf 2gb): image

refractionpcsx2 commented 2 years ago

Can you show a PCSX2 log AFTER you try to run the game (without patching the exe)

kokutoukiritsugu commented 2 years ago

it crash

logs\emuLog.txt:

Loading language translation databases for 'Chinese (Simplified)' [zh_CN]

PCSX2 1.7.0-20220516173052- compiled on May 16 2022
Savestate version: 0x9a2c0000

Host Machine Init:
    Operating System =  Microsoft Windows 10, 64-bit
    Physical RAM     =  16309 MB
    CPU name         =  AMD Ryzen 7 5800X 8-Core Processor
    Vendor/Model     =  AuthenticAMD (stepping 00)
    CPU speed        =  3.799 ghz (16 logical threads)
    x86PType         =  Standard OEM
    x86Flags         =  178bfbff 7ef8320b
    x86EFlags        =  2fd3fbff

x86 Features Detected:
    SSE2.. SSE3.. SSSE3.. SSE4.1.. SSE4.2.. AVX.. AVX2.. FMA
    SSE4a 

The current power profile is '平衡'.
The current min / max processor states
AC: 0% / 100%
Battery: 5% / 100%

Reserving memory for recompilers...
HLE Host: Set 'host:' root path to: \

Patches: No CRC found, using 00000000 instead.
isoFile open ok: D:\games\games\emu\ps2\roms\Mobile Suit GUNDAM, -One Year War 0079- 机动战士高达 一年战争.cso
    Image type  = DVD
 * CDVD Disk Open: DVD, Single layer or unknown:
 * * Track 1: Data (Mode 1) (2009870 sectors)
Vsync is OFF
No adapter selected, using first.
D3D Adapter: AMD Radeon R7 450 Series
Creating a 640x480 flip-discard windowed swap chain
D3D11 Graphics Driver Info:
    D3D_FEATURE_LEVEL_11_0
    VID: 0x1002 PID: 0x682B
    AMD Radeon R7 450 Series
    Driver Version: 27.20.15030.3002
Vsync is OFF
GS Lookup CRC:00000000
48000 SampleRate: 
McdSlot 0 [File]: [is not memcard file]
McdSlot 1 [File]: D:\games\games\emu\ps2\pcsx2-v1.7.2754-2-g7c9493cbc-windows-x86\memcards\Mcd002.ps2
McdSlot 0: [Folder] D:\games\games\emu\ps2\pcsx2-v1.7.2754-2-g7c9493cbc-windows-x86\memcards\Mcd001.ps2
(FolderMcd) Indexing slot 0 with filter "".
EE/iR5900-32 Recompiler Reset
    Bios Found: Europe  v01.20(02/09/2000)  Console
# Initialize memory (rev:3.42, ctm:393Mhz, cpuclk:295Mhz )
Frame buffer size set to  512x512 (512x512)

PlayStation 2 ======== Hard reset boot
 ROMGEN=2000-0902, IOP info (CPUID=1f, CACH_CONFIG=0, 2MB, IOP mode)
 <20000902-234321,ROMconf,PS20120EC20000902.bin:11536>
# Total accessable memory size: 32 MB (B:2:8:0) (342:2:7c30)
# TLB spad=0 kernel=1:12 default=13:30 extended=31:38
# Initialize Start.
# Initialize GS ...
# Initialize INTC ...
# Initialize TIMER ...
# Initialize DMAC ...
# Initialize VU1 ...
# Initialize VIF1 ...
# Initialize GIF ...
# Initialize VU0 ...
# Initialize VIF0 ...
# Initialize IPU ...
# Initialize FPU ...
# Initialize User Memory ...
Frame buffer size set to  512x512 (512x512)
# Initialize Scratch Pad ...
# Initialize Done.

EE DECI2 Manager version 0.06 May 11 2000 18:08:48
  CPUID=2e20, BoardID=0, ROMGEN=2000-0902, 32M

Patches: No CRC found, using 00000000 instead.
(SYSTEM.CNF) Detected PS2 Disc = cdrom0:\SLPS_254.78;1
(SYSTEM.CNF) Software version = 1.02
(SYSTEM.CNF) Disc region type = NTSC
refractionpcsx2 commented 2 years ago

Okay, thanks. However your games are probably not going to work if you have a European PS2. A lot of games need ROM2 support which requires a Chinese BIOS in order to function.

kokutoukiritsugu commented 2 years ago

most ps2 in china are hk or us version

refractionpcsx2 commented 2 years ago

well from experience a lot of Chinese PS2 games will not work on PCSX2 unless you're using a Chinese BIOS, because the character set is otherwise missing. (because it's missing from the BIOS, not a PCSX2 issue)

kokutoukiritsugu commented 2 years ago

yes, this ISO is not bios problem, is a JAPAN version ISO, the orginal ISO works fine in pcsx2, but some guy mod it to chinese, caused this problem...

image

Can I post a mega.nz ISO link here? you can research it.

refractionpcsx2 commented 2 years ago

No, that would be piracy. if the ISO is broken with the patch on it, then you need to go back to the person who made the patch for them to fix it.

kokutoukiritsugu commented 2 years ago

year 200x some guy made the chinese version...

remove elf 2gb check or add a hack switch checkbox, will fix a lot of ISO.

https://github.com/PCSX2/pcsx2/blob/29ad851a9cd6b7a14780211c9ef56792d0fc89b8/pcsx2/Elfheader.cpp#L188

this error not show and program crash in 1.7 & nightly version, this crash behavior is a bug ?

refractionpcsx2 commented 2 years ago

remove elf 2gb check or add a hack switch checkbox, will fix a lot of ISO.

But I don't want to? If an ELF is reporting over 2gb in size, there is something wrong with it. I'm not going to just ignore errors because your dodgy hacked Chinese ISO's don't like it.

fuhuan416 commented 2 years ago

Hope this will add to GameDB or Hacks.

refractionpcsx2 commented 2 years ago

No, fix your ISO's or get the patcher to make a patch which doesn't break it. We're not introducing hacks just because somebody else did a poor job.

Also we don't support modified ISO's.

kokutoukiritsugu commented 2 years ago

finaly, i find a way to fix this iso... i post here for someone search this.

Akumajo Dracula - Yami no Juin 恶魔城:暗黑的诅咒

"恶魔城:暗黑的诅咒[中文].iso" size: 7.86 GB 8,442,576,896

Snipaste_2022-06-04_12-34-17

delete em-d5.iso and em-d5.rar use winhex edit SLPM_661.75, remove garbage data form 5F4D04 to file end.

Snipaste_2022-06-04_12-48-09

Mobile Suit Gundam - One Year War 机动战士高达 一年战争

"机动战士高达 一年战争 [中文].iso" size: 3.83 GB 4,116,213,760

Snipaste_2022-05-29_02-02-06

use winhex edit SLPS_254.78, remove garbage data form 197654A8 to file end. additional, replace DEMO MAMOVIE MOVIE folder with original japan iso version.

Snipaste_2022-05-29_02-03-05

Snipaste_2022-05-29_02-17-49