Editing PS1 Emulation
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 157: | Line 157: | ||
| colspan="2" style="text-align:center; background-color:#ddddff;" | ''Any'' | | colspan="2" style="text-align:center; background-color:#ddddff;" | ''Any'' | ||
|- | |- | ||
! [[4. | ! [[4.88_CEX|4.88]] | ||
| style="background-color:#ddddff; font-family:monospace" | | | style="background-color:#ddddff; font-family:monospace" | 0C553CE93A2A6322E16636DD76D75E32 || style="background-color:#ddddff;" | 21/04/12/11:34 | ||
|} | |} | ||
<span style="font-size:small"> | <span style="font-size:small"> | ||
{{ | {{widedot}}'''Decrypted (elf)''': changes <abbr title="When comparing two decrypted files of the same revision from different firmwares the only differences are the build label (1 area with size 0x20) and the target firmware (1 area with size 0x2)">every firmware version</abbr><br> | ||
{{ | {{widedot}}'''<abbr title="0x20 bytes">Build label</abbr>''': yes, with timestamp, search for '''-sgpu-sspu-sli4'''<br> | ||
{{ | {{widedot}}'''<abbr title="2 bytes">Target Firmware</abbr>''': yes repeated '''one''' time<br> | ||
{{ | {{widedot}}'''Revision''': unknown | ||
</span> | </span> | ||
</div> | </div> | ||
Line 275: | Line 275: | ||
| colspan="2" style="text-align:center; background-color:#ddddff;" | ''Any'' | | colspan="2" style="text-align:center; background-color:#ddddff;" | ''Any'' | ||
|- | |- | ||
! [[4. | ! [[4.88_CEX|4.88]] | ||
| style="background-color:#ddddff; font-family:monospace" | | | style="background-color:#ddddff; font-family:monospace" | D3283D3F3B5CDF68113560829530E7B3 || style="background-color:#ddddff;" | 21/04/12/11:34 | ||
|} | |} | ||
<span style="font-size:small"> | <span style="font-size:small"> | ||
{{ | {{widedot}}'''Decrypted (elf)''': changes <abbr title="When comparing two decrypted files of the same revision from different firmwares the only differences are the build label (1 area with size 0x20) and the target firmware (2 areas with size 0x2)">every firmware version</abbr><br> | ||
{{ | {{widedot}}'''<abbr title="0x20 bytes">Build label</abbr>''': yes, with timestamp, search for '''-sgpu-sli4'''<br> | ||
{{ | {{widedot}}'''<abbr title="2 bytes">Target Firmware</abbr>''': yes repeated '''two''' times<br> | ||
{{ | {{widedot}}'''Revision''': <abbr title="ps1_netemu.self from firmware 2.10 (or older) doesnt contains the revision string">sometimes</abbr>, search for '''Revision''' | ||
</span> | </span> | ||
</div><div style="float:left;"> | </div><div style="float:left;"> | ||
Line 372: | Line 372: | ||
| colspan="2" style="text-align:center; background-color:#ddddff;" | ''Any'' | | colspan="2" style="text-align:center; background-color:#ddddff;" | ''Any'' | ||
|- | |- | ||
! [[4. | ! [[4.88_CEX|4.88]] | ||
| style="background-color:#ddddff; font-family:monospace" | | | style="background-color:#ddddff; font-family:monospace" | 4002EC6CB88F5D2D5E7DF0B0F80A6A0A || style="background-color:#ddddff;" | 21/04/12/11:35 | ||
|} | |} | ||
<span style="font-size:small"> | <span style="font-size:small"> | ||
{{ | {{widedot}}'''Decrypted (elf)''': changes <abbr title="When comparing two decrypted files of the same revision from different firmwares the only differences are the build label (1 area with size 0x20) and the target firmware (2 areas with size 0x2)">every firmware version</abbr><br> | ||
{{ | {{widedot}}'''<abbr title="0x20 bytes">Build label</abbr>''': yes, with timestamp, search for '''-sgpu-sspu-sli4'''<br> | ||
{{ | {{widedot}}'''<abbr title="2 bytes">Target Firmware</abbr>''': yes repeated '''two''' times<br> | ||
{{ | {{widedot}}'''Revision''': unknown | ||
</span> | </span> | ||
</div> | </div> | ||
Line 464: | Line 464: | ||
== PS1 BIOS == | == PS1 BIOS == | ||
The PS1 emulators included in between PS3 firmwares [[1.00_AV|1.00]] up to [[2.01_CEX|2.01]] contains a PS1 BIOS embedded inside the emulator .SELF structure<br> | The PS1 emulators included in between PS3 firmwares [[1.00_AV|1.00]] up to [[2.01_CEX|2.01]] contains a PS1 BIOS embedded inside the emulator .SELF structure<br> | ||
In PS3 firmware [[2.10_CEX|2.10]] (at the same time the ps1_newemu.self was introduced) the PS1 BIOS was | In PS3 firmware [[2.10_CEX|2.10]] (at the same time the ps1_newemu.self was introduced) the PS1 BIOS was stripped from the .SELF and distributed as an independant file named ps1_rom.bin. This BIOS had a size of 4.089.584 bytes (MD5: FBB5F59EC332451DEBCCF1E377017237) and is exactly the same file that was previously embedded in all PS1 emulators<br> | ||
In PS3 firmware [[4.00_CEX|4.00]] the ps1_rom.bin file was reduced in size down to 524.288 bytes (MD5: 81BBE60BA7A3D1CEA1D48C14CBCC647B) by removing the unrelated PS2 functions<br> | In PS3 firmware [[4.00_CEX|4.00]] the ps1_rom.bin file was reduced in size, down to 524.288 bytes (MD5: 81BBE60BA7A3D1CEA1D48C14CBCC647B) by removing the unrelated PS2 functions<br> | ||
The latest version of ps1_rom file is the first 512KB of the 1.90 PS2 rom.<br> | The latest version of ps1_rom file is the first 512KB of the 1.90 PS2 rom.<br> | ||
Line 479: | Line 479: | ||
|} | |} | ||
The PS1 BIOS version can be seen in | The PS1 BIOS version can be seen in two strings (codenamed VERSTR) with this text, where the suffix "'''A'''" at the end of the first string indicates the region (A=America) | ||
<pre>System ROM Version 5.0 06/23/03 A | <pre>System ROM Version 5.0 06/23/03 A | ||
Copyright 1993-1999 (C) Sony Computer Entertainment Inc. | Copyright 1993-1999 (C) Sony Computer Entertainment Inc. | ||
</pre> | </pre> | ||
=== PS1 BIOS Region patch === | === PS1 BIOS Region patch === | ||
Inside the emulators there is a string with the characters: <span style="font-familly:monospace; font-weight:bold">JJJJAEJEAEJJEJJA</span> that works as a selector based on the [[Product Code]] (also known as TargetID | Inside the emulators there is a string with the characters: <span style="font-familly:monospace; font-weight:bold">JJJJAEJEAEJJEJJA</span> that works as a selector based on the [[Product Code]] (also known as TargetID)<br> | ||
When the emulators are executed (inmediatly before booting the game) | When the emulators are executed (inmediatly before booting the game) the PS1 BIOS is loaded into memory and a patch is applyed to the version string to replace the suffix "'''A'''" by one of the characters from the selector string<br> | ||
This patch is related to the region, | This patch is related to the region, it changes the video output, and is unknown if is responsible for anything else, like timings etc... | ||
{|class="wikitable" style="line-height:110%; font-size:90%" | {|class="wikitable" style="line-height:110%; font-size:90%" | ||
|-style="text-align:center" | |-style="text-align:center" | ||
! Console Type | ! Console Type | ||
| {{NOT_IN_USE}} | | | {{NOT_IN_USE}} || {{TOOL}} {{SD}} || {{DEX}} {{DTCP-IP}} {{TEST}} || colspan="13" | {{CEX}} {{Shop}} | ||
|-style="text-align:center; font-weight:bold" | |-style="text-align:center; font-weight:bold" | ||
! [[SKU_Regioning|Release Region]] | ! [[SKU_Regioning|Release Region]] | ||
Line 502: | Line 498: | ||
|-style="text-align:center" | |-style="text-align:center" | ||
! [[SKU_Models|PS3 Models]] | ! [[SKU_Models|PS3 Models]] | ||
| style="background:lightgrey" | N/A || DECR- | | style="background:lightgrey" | N/A || DECR-xx00<br>DEH-Zxx00 || DECH-xx00 <br>DECH-Sxx00 || CECHx00 <br>CECH-xx00 || CECHx01 <br>CECH-xx01 || CECHx04 <br>CECH-xx04 || CECHx05 <br>CECH-xx05 || CECHx03 <br>CECH-xx03 || CECHx11 <br>CECH-xx11 || CECHx02 <br>CECH-xx02 || CECHx06 <br>CECH-xx06 || CECHx07 <br>CECH-xx07 || CECHx08 <br>CECH-xx08 || style="background:lightgrey" | N/A || CECHx12 <br>CECH-xx12 || CECHx14 <br>CECH-xx14 | ||
|-style="text-align:center; font-weight:bold" | |-style="text-align:center; font-weight:bold" | ||
! [[Product Code]] | ! [[Product Code]] | ||
Line 508: | Line 504: | ||
|-style="text-align:center" | |-style="text-align:center" | ||
! [[SKU_Regioning|PS1 PS2 Region]] | ! [[SKU_Regioning|PS1 PS2 Region]] | ||
| colspan="3" | | | colspan="3" style="background:lightgrey" | N/A || NTSC-J || NTSC-U/C || PAL || NTSC-J || PAL || NTSC-U/C || PAL || NTSC-J || NTSC-J || PAL || NTSC-J || NTSC-J || NTSC-U/C | ||
|-style="text-align:center; font-weight:bold" | |-style="text-align:center; font-weight:bold" | ||
! PS1 BIOS patch | ! PS1 BIOS patch | ||
| J || J || J || J || A || E || J || E || A || E || J || J || E || J || J || A | |||
|} | |} | ||
The PS3 firmware does a check to the [[Product Code]] (located inside the [[IDPS]]) and based on it it patches the BIOS while is loaded in memory, as example for a retail PS3 model released in Russia (Fat=CECHx'''08''' or Slim/SuperSlim CECH-xx'''08''') it patches the version string with "'''E'''" resulting in: | |||
<pre> | <pre> | ||
System ROM Version 5.0 06/23/03 E | System ROM Version 5.0 06/23/03 E | ||
Line 520: | Line 515: | ||
</pre> | </pre> | ||
=== PS1 BIOS Cobra Patch === | |||
Every CFW which use cobra module potentially can be affected by nasty bug that is there probably even before 7.00, example based on ps1_emu: | Every CFW which use cobra module potentially can be affected by nasty bug that is there probably even before 7.00, example based on ps1_emu: | ||
<pre> | <pre> | ||
Line 530: | Line 525: | ||
</pre> | </pre> | ||
The cobra patch is skipping part of code where the region of the PS3 is stored for later usage, and is setting the whole emulation to Japan region (NTSC U/C) by applying an static hard patch that belongs to [[Product Code]] '''0x82'' | The cobra patch is skipping part of code where the region of the PS3 is stored for later usage, and is setting the whole emulation to Japan region (NTSC U/C) by applying an static hard patch that belongs to [[Product Code]] '''0x82'' potentially leading to PAL games frame pacing issues, desynced audio, and maybe more. While i can't test that i'm 100% sure that better solution here will be read third character of Title ID from SYSTEM.CNF file of disc/iso, and then applying a dynamic patch based on it<br> | ||
If the game Title ID have an "'''E'''" (example: SLES-12345) then patch to ANY EU target ID, similar for US, for titles where U or E isn't found just use default J target ID | If the game Title ID have an "'''E'''" (example: SLES-12345) then patch to ANY EU target ID, similar for US, for titles where U or E isn't found just use default J target ID | ||
<pre> | <pre> | ||
Line 539: | Line 534: | ||
}; | }; | ||
</pre> | </pre> | ||
Cobra have region free patch that in the end make X set to A (America) region, which apparently makes the bios region free. This can be true as similar thing happen on PCSX2 in ps1 mode. US rom is able to run all regions games, while JPN/EU fail to load different regions. It is because later JPN/EU BIOS versions have got an additional CD licence check introduced, accepting only the discs matching the hardcoded region. US BIOSes have never got this check implemented. By the way, it is the same thing with the PS2 BIOSes - only the US one will accept the discs from all over the world by default (that is why you have to patch the MECHACON for the US DTL region to get true region free playback). | |||
=== PS1 BIOS Replacements === | === PS1 BIOS Replacements === | ||
Is worth to note the suffix "'''A | Is worth to note the suffix "'''A'''" in the version string inside the BIOS is always on the same offset 0x7FF52 in ALL PS1 and PS2 bios images. So in case of replacing the bios the patches mentioned above will be applyed normally<br> | ||
The bios can be replaced by any PS1 rom image (included DTL models), and by most PS2 rom images (maybe by all, deckard models untested). Replacing it by the original PS1 bios restores the Sony logo at start up, and | The bios can be replaced by any PS1 rom image (included DTL models), and by most PS2 rom images (maybe by all, deckard models untested). Replacing it by the original PS1 bios restores the Sony logo at start up, and should allow to run ps1 menu alone, but that's untested. Props to Jabu, iirc he figured out running Sony startup screen ages ago<br> | ||
The emulator have a bug (netemu at least) that loads the bios with a fixed size of 4MB file. They probably not changed that size after they reduced the bios file size from 4MB to 512KB. So any PS1/PS2(no deckard) bios image can be used if it have a size of 4MB or smaller. All of them should load games fine. | The emulator have a bug (netemu at least) that loads the bios with a fixed size of 4MB file. They probably not changed that size after they reduced the bios file size from 4MB to 512KB. So any PS1/PS2(no deckard) bios image can be used if it have a size of 4MB or smaller. All of them should load games fine. | ||
Line 562: | Line 559: | ||
* [[PS1_Savedata#Virtual_Memory_Card_PS1_.28.VM1.29 | .VM1 Playstation 1 Memory cards]] can be edited with [[PS1_Savedata#Memory_Card_Tools_PS1 | MemcardRex]] | * [[PS1_Savedata#Virtual_Memory_Card_PS1_.28.VM1.29 | .VM1 Playstation 1 Memory cards]] can be edited with [[PS1_Savedata#Memory_Card_Tools_PS1 | MemcardRex]] | ||
* [[PS2_Savedata#Virtual_Memory_Card_PS2_.28.VM2.29 | .VM2 Playstation 2 Memory cards]] can be edited with [http://www.csclub.uwaterloo.ca:11068/mymc/ mymc] | * [[PS2_Savedata#Virtual_Memory_Card_PS2_.28.VM2.29 | .VM2 Playstation 2 Memory cards]] can be edited with [http://www.csclub.uwaterloo.ca:11068/mymc/ mymc] | ||
== Arguments == | == Arguments == | ||
Line 743: | Line 736: | ||
=== Embedded Game settings === | === Embedded Game settings === | ||
All the PS1 emulators | All the PS1 emulators contains a list of game settings embedded inside his .SELF structure inside 3 tables we could name the '''Checksums Table''', the '''Titles table''', and the '''Commands Table'''. The offsets of this tables differs by emulator revision and type<br><!-- as far i know there is not a known way to find his offsets programatically, other than doing a search for a well known value, usually the first checksum--> | ||
The entry point to read the whole structure of this tables starts by reading the 4 bytes of the first '''Checksum''' of the first game from the checksums table (see below), next 4 bytes are an offset (to read the Titles table), next 4 bytes is a '''Command Count''' and next 4 bytes is a '''Command offset''' (to read the Commands Table), to load the data in the other tables is needed to <abbr title="Or substract 0xFEB0000 in firmware 1.70 and keep in mind the order of the commands table is inverted">substract 0x10000</abbr> to this offsets located next to the checksum of a specific game<br> | The entry point to read the whole structure of this tables starts by reading the 4 bytes of the first '''Checksum''' of the first game from the checksums table (see below), next 4 bytes are an offset (to read the Titles table), next 4 bytes is a '''Command Count''' and next 4 bytes is a '''Command offset''' (to read the Commands Table), to load the data in the other tables is needed to <abbr title="Or substract 0xFEB0000 in firmware 1.70 and keep in mind the order of the commands table is inverted">substract 0x10000</abbr> to this offsets located next to the checksum of a specific game<br> | ||
The Title IDs (from inside the '''Titles table''') doesnt seems to be used for any logic check, seems to be mostly identifyers (with typos) intended to be displayed in some kind of debug menu in "human readable format" only for informative purposes. Are text strings null terminated in the format "ABCD_123.45" and aligned to 8 bytes, so most of them have a total size of 0x10 but in old firmwares there are some entries with the text "unknown" with a size of 8 bytes (in other words, the entries with the text "unknown" are half the size of the others)<br> | The Title IDs (from inside the '''Titles table''') doesnt seems to be used for any logic check, seems to be mostly identifyers (with typos) intended to be displayed in some kind of debug menu in "human readable format" only for informative purposes. Are text strings null terminated in the format "ABCD_123.45" and aligned to 8 bytes, so most of them have a total size of 0x10 but in old firmwares there are some entries with the text "unknown" with a size of 8 bytes (in other words, the entries with the text "unknown" are half the size of the others)<br> |