Editing PS2 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 3: | Line 3: | ||
Emulation of Playstation 2 is currently handled by 3 kind of emulators. CECH-A/B models use ps2_emu.self able to use built-in PS2 hardware (EE/GS/Rambus memory), and have best compatibility. CECH-C/E use ps2_gxemu, this emulator use physical Graphic Synthesizer found in this ps3 model, but Emotion Engine is fully emulated here, also there is no Rambus memory. All other models emulate PS2 thru fully software based ps2_netemu used for ps2 classics, and hacked now to use decrypted ISO files. Earlier before Sony provided ps2 classics on PS Store there was another soft only emulator strongly based on ps2_gxemu. It was called ps2_softemu, and had support for original PS2 CDVD. Only emulator not able to run physical discs is ps2_netemu. | Emulation of Playstation 2 is currently handled by 3 kind of emulators. CECH-A/B models use ps2_emu.self able to use built-in PS2 hardware (EE/GS/Rambus memory), and have best compatibility. CECH-C/E use ps2_gxemu, this emulator use physical Graphic Synthesizer found in this ps3 model, but Emotion Engine is fully emulated here, also there is no Rambus memory. All other models emulate PS2 thru fully software based ps2_netemu used for ps2 classics, and hacked now to use decrypted ISO files. Earlier before Sony provided ps2 classics on PS Store there was another soft only emulator strongly based on ps2_gxemu. It was called ps2_softemu, and had support for original PS2 CDVD. Only emulator not able to run physical discs is ps2_netemu. | ||
Emulators are self files, but not typical one. Emulators are not truly PS3 Game OS elf executables, but Guest OS'es running on LV1 of PS3. This mean that LV2, or more friendly Game OS is unloaded before emulator is loaded. This also mean that while emulators are running we can't call any LV2 function. Also LV1 syscalls are limited to call from all emulators, but can be fully unlocked. | Emulators are self files, but not typical one. Emulators are not truly PS3 Game OS elf executables, but Guest OS'es running on LV1 of PS3. This mean that LV2, or more friendly Game OS is unloaded before emulator is loaded. This also mean that while emulators are running we can't call any LV2 function. Also LV1 syscalls are limited to call from all emulators, but can be fully unlocked. | ||
All emulators use built-in stripped developement version of PS2 BIOS with disabled debug functions that can affect some games. This is done because some games print debug info on screen when found that are run on dev bios. Bios between ps2_emu, and ps2_gxemu/ps2_netemu are different. Ps2_emu BIOS is able to run only on ps2emu version of emulator due to RDRAM check. | All emulators use built-in stripped developement version of PS2 BIOS with disabled debug functions that can affect some games. This is done because some games print debug info on screen when found that are run on dev bios. Bios between ps2_emu, and ps2_gxemu/ps2_netemu are different. Ps2_emu BIOS is able to run only on ps2emu version of emulator due to RDRAM check. | ||
PS3 models without Emotion Engine unit use "SPE-compatible SIMD graphics-rounding mode for VMX/Altivec Instructions" for FPU, and VU0 emulated floats calculations. This is set on emulator init by HV call 97 with param 1. VU1 actually run at SPE core so no compatibility mode need (or can) to be set. SPE compatible mode for PPE mean that rounding mode is set as round to zero, denormals are treated as zero, and there are no infinities or NaNs. So | PS3 models without Emotion Engine unit use "SPE-compatible SIMD graphics-rounding mode for VMX/Altivec Instructions" for FPU, and VU0 emulated floats calculations. This is set on emulator init by HV call 97 with param 1. VU1 actually run at SPE core so no compatibility mode need (or can) to be set. SPE compatible mode for PPE mean that rounding mode is set as round to zero, denormals are treated as zero, and there are no infinities or NaNs. So literally what PS2 VU was originally. Although SPE, and PPE SPE compatibility mode can still be inaccurate comparing to PS2. Good example here are TriAce games, or Castlevania COD where SPE calculation is wrong by 1 bit making games unplayable without patch. This is due to some PS2 math algo specific inaccuracies in FPU/VU implementation that are not present on any other hardware. | ||
Note: | Note: | ||
* not available in early Tool/DECR and Debug/DEX firmwares. But available in AV TOOL firmware since 1.00 | * not available in early Tool/DECR and Debug/DEX firmwares. But available in AV TOOL firmware since 1.00 | ||
* Emulation is based on a SCPH-50000/SCPH-20401 Playstation 2 Model. | * Emulation is based on a SCPH-50000/SCPH-20401 Playstation 2 Model. | ||
* [ | * [http://unina.stidue.net/Universita'%20di%20Trieste/Ingegneria%20Industriale%20e%20dell'Informazione/Tuzzi/Architetture_Avanzate_dei_Calcolatori/Emotion_2.pdf Introduction to PlayStation2 Architecture.pdf] | ||
* ps2tek docs - https://psi-rockin.github.io/ps2tek/ | * ps2tek docs - https://psi-rockin.github.io/ps2tek/ | ||
==PS2 emulators workload comparison== | ==PS2 emulators workload comparison== | ||
{{PS2 emulators workload comparison}} | {{PS2 emulators workload comparison}} | ||
Note: Apparently ps2_gxemu SPU layout changed at some point (maybe ps2_emu too), and above table is not accurate for latest emu versions.<br> | |||
0-6 layout for ps2_gxemu currently look like this: IOP, SPU2, IPU, VU1, EEDMA, GSGIF, UNK(probably isolation). | |||
==PS2 Emulator Types and Revisions== | ==PS2 Emulator Types and Revisions== | ||
Line 135: | Line 137: | ||
|} | |} | ||
<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 difference is the build label">every firmware version</abbr><br> | ||
{{ | {{widedot}}'''<abbr title="0x20 bytes">Build label</abbr>''': yes, with timestamp, search for '''ps2ver:'''<br> | ||
{{ | {{widedot}}'''Target Firmware''': no/unknown<br> | ||
{{ | {{widedot}}'''Revision''': unknown | ||
</span> | </span> | ||
</div> | </div> | ||
Line 203: | Line 205: | ||
|} | |} | ||
<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 there are no differences">every emu revision</abbr><br> | ||
{{ | {{widedot}}'''<abbr title="0x20 bytes">Build label</abbr>''': no/unknown<br> | ||
{{ | {{widedot}}'''Target Firmware''': no/unknown<br> | ||
{{ | {{widedot}}'''Revision''': unknown | ||
</span> | </span> | ||
</div><div style="float:left; width:24%;"> | </div><div style="float:left; width:24%;"> | ||
Line 259: | Line 261: | ||
|} | |} | ||
<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 there are no differences">every emu revision</abbr><br> | ||
{{ | {{widedot}}'''<abbr title="0x20 bytes">Build label</abbr>''': no/unknown<br> | ||
{{ | {{widedot}}'''Target Firmware''': no/unknown<br> | ||
{{ | {{widedot}}'''Revision''': unknown | ||
</span> | </span> | ||
</div><div style="float:left; width:24%;"> | </div><div style="float:left; width:24%;"> | ||
Line 317: | Line 319: | ||
|} | |} | ||
<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 there are no differences">every emu revision</abbr><br> | ||
{{ | {{widedot}}'''<abbr title="0x20 bytes">Build label</abbr>''': yes, without timestamp, search for '''build r'''<br> | ||
{{ | {{widedot}}'''Target Firmware''': included in the build label<br> | ||
{{ | {{widedot}}'''Revision''': yes, <abbr title="the location can be seen by comparing 4.23 (value 0x40DC) with 4.25 (value 0x4164) at offset 0x3E4BA in both">'''one''' time</abbr>, and included in the build label | ||
</span> | </span> | ||
</div> | </div> | ||
Line 421: | Line 423: | ||
===LIMG Segment=== | ===LIMG Segment=== | ||
The ISO.BIN.ENC | The ISO.BIN.ENC have a block of 0x4000 bytes added at the end codenamed "LIMG" that works as a descriptor of the ISO structure | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 480: | Line 482: | ||
===Video Modes=== | ===Video Modes=== | ||
'''Note:''' Real PS2 : | '''Note:''' Real PS2 : http://users.neoscientists.org/~blue/ps2videomodes.txt | ||
Video Modes | Video Modes | ||
Line 604: | Line 606: | ||
|- | |- | ||
|} | |} | ||
===PS2 Memory and Hardware Mapped Registers Layout=== | ===PS2 Memory and Hardware Mapped Registers Layout=== | ||
Line 942: | Line 916: | ||
===ps2_netemu.self=== | ===ps2_netemu.self=== | ||
#BD Remote Control | #BD Remote Control | ||
#PLAYSTATION(R)3 Controller (Vendor ID 0x54C, Product ID 0x268), | #PLAYSTATION(R)3 Controller (Vendor ID 0x54C, Product ID 0x268), | ||
Line 954: | Line 925: | ||
#Vendor ID 0xF0D (Hori), Product ID 0x4A | #Vendor ID 0xF0D (Hori), Product ID 0x4A | ||
#Vendor ID 0x54C (Sony), Product ID 0x5AF | #Vendor ID 0x54C (Sony), Product ID 0x5AF | ||
==BIOS== | ==BIOS== | ||
Line 1,021: | Line 987: | ||
| ADDDRV || 0x85E960 || 0x3DF60 || Adds support for the DVD ROM (rom1:), via ROMDRV. || ELF | | ADDDRV || 0x85E960 || 0x3DF60 || Adds support for the DVD ROM (rom1:), via ROMDRV. || ELF | ||
|- | |- | ||
| STDIO || | | STDIO || 0x85DDC0 || 0x3D3C0 || Standard I/O library. || ELF | ||
|- | |- | ||
| SIFMAN || 0x85F9B0 || 0x3EFB0 || SIF manager. || ELF | | SIFMAN || 0x85F9B0 || 0x3EFB0 || SIF manager. || ELF | ||
Line 1,051: | Line 1,017: | ||
| RDRAM || 0x861A00 || 0x41000 || Provides a RDRAM test for the EE at power-on. This is run from RESET. || BIN | | RDRAM || 0x861A00 || 0x41000 || Provides a RDRAM test for the EE at power-on. This is run from RESET. || BIN | ||
|- | |- | ||
| EELOADCNF || 0x864750 || 0x43D50 || Contains the IOP boot configuration file for EELOAD. || BIN | |||
| EELOADCNF || | |||
|- | |- | ||
| SIFCMD || 0x864900 || 0x43F00 || SIF command module. Contains the SIF command and SIF RPC functions. || ELF | | SIFCMD || 0x864900 || 0x43F00 || SIF command module. Contains the SIF command and SIF RPC functions. || ELF | ||
Line 1,078: | Line 1,042: | ||
|- | |- | ||
| - || 0x87FE20 || 0x5F420 || || BIN | | - || 0x87FE20 || 0x5F420 || || BIN | ||
|- | |- | ||
| MCSERV || 0x881D40 || 0x61340 || RPC server for MCMAN. || ELF | | MCSERV || 0x881D40 || 0x61340 || RPC server for MCMAN. || ELF | ||
Line 1,089: | Line 1,051: | ||
| - || 0x8866C0 || 0x65CC0 || || BIN | | - || 0x8866C0 || 0x65CC0 || || BIN | ||
|- | |- | ||
| KROM || | | KROM || 0x886A00 || 0x66000 || Kanji ROM? Not sure where this is used. || BIN | ||
|- | |- | ||
| - || 0x8A0870 || 0x7FE70 || || BIN | | - || 0x8A0870 || 0x7FE70 || || BIN | ||
Line 1,194: | Line 1,156: | ||
*Notes | *Notes | ||
**List of PS2 disc games compatibles with PS3 HDD installation hardcoded in '''dev_flash/vsh/module/[[game_ext_plugin]].sprx''' | **List of PS2 disc games compatibles with PS3 HDD installation hardcoded in '''dev_flash/vsh/module/[[game_ext_plugin]].sprx''' | ||
** | **Virtuall PS2 HDD support module '''dev_flash/vsh/module/[[libps2hdd]].sprx''' ? | ||
===PS2 System Data (PSN HDD Tool package)=== | ===PS2 System Data (PSN HDD Tool package)=== | ||
Line 1,289: | Line 1,251: | ||
===ps2_netemu syscalls === | ===ps2_netemu syscalls === | ||
Vector at 0xC00 address. | Vector at 0xC00 address. | ||
0x0 - 0 = exec smth, | |||
1 = 0x132 lv1 panic, | |||
2 = 0x133 lv1 panic, | |||
3 = 0x134 lv1 panic, | |||
4 = 0x135 lv1 panic, | |||
else = 0x136 lv1 panic) | |||
0xC - exec smth | |||
0x5 - exec smth | |||
1 = 0x132 lv1 panic | 0x6 - exec smth | ||
2 = 0x133 lv1 panic | 0x10 - lv1 panic | ||
3 = 0x134 lv1 panic | |||
4 = 0x135 lv1 panic | |||
else = 0x136 lv1 panic | |||
0x10 - lv1 panic | |||
0x800000XX - HV Syscall where XX is syscall nr. | 0x800000XX - HV Syscall where XX is syscall nr. | ||
else (other syscalls) - jump to 0x12670 (FW4.78 - current) for HW_0 | else (other syscalls) - jump to 0x12670 (FW4.78 - current) for HW_0 | ||
Line 1,475: | Line 1,400: | ||
If you want to read some speculation and brainstorming about them, please join the {{talk}} page | If you want to read some speculation and brainstorming about them, please join the {{talk}} page | ||
<div> | |||
<div style="float:top; text-align:center;">'''PS2 Emulators Config Commands Overview'''</div> | |||
<div style="float:left; width:50%;"> | |||
<div style="float:right; padding-right:5px;"> | |||
{| class="wikitable" style="font-size:85%; line-height:100%; text-align:center" | {| class="wikitable" style="font-size:85%; line-height:100%; text-align:center" | ||
| | |- | ||
! rowspan="2" | Command Name !! colspan="3" | Command ID !! rowspan="2" style="padding:1px" | Max<br>Usage !! colspan="4" | Command Data | ! rowspan="2" | Command Name !! rowspan="36" style="padding:0px" | || colspan="3" | Command ID !! rowspan="36" style="padding:0px" | || rowspan="2" style="padding:1px" | Max<br>Usage !! rowspan="36" style="padding:0px" | || colspan="4" | Command Data | ||
|- | |- | ||
! style="padding:1px" | gxemu !! style="padding:1px" | softemu !! style="padding:1px" | netemu !! Length !! colspan="3" | Params | ! style="padding:1px" | gxemu !! style="padding:1px" | softemu !! style="padding:1px" | netemu !! Length !! colspan="3" | Params | ||
Line 1,489: | Line 1,418: | ||
| 0x00 || 0x00 || 0x01 | | 0x00 || 0x00 || 0x01 | ||
| 3 ? || style="text-align:left" | 2 * uint32_t | | 3 ? || style="text-align:left" | 2 * uint32_t | ||
| {{cellcolors|#555|#fff|center}} offset || | | {{cellcolors|#555|#fff|center}} offset || {{cellcolors|#555|#fff|center}} functionid | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} Set something | ! {{cellcolors|#fff|#000}} Set something | ||
| 0x01 || 0x01 || 0x02 | | 0x01 || 0x01 || 0x02 | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | ? | | colspan="3" | 1000=?<br>3000=?<br>6000=? | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} | ! {{cellcolors|#fff|#000}} Switch something | ||
| 0x02 || 0x02 || 0x03 | | 0x02 || 0x02 || 0x03 | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
Line 1,504: | Line 1,433: | ||
| 0x03 || 0x03 || 0x04 | | 0x03 || 0x03 || 0x04 | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | ? | | colspan="3" | 8=?<br>0x10=? | ||
|- | |- | ||
! {{cellcolors|#bd5|#000}} | ! {{cellcolors|#bd5|#000}} Set DIRECT/DIRECTHL VIF1 in SP3 EEDMA | ||
| 0x04 || 0x04 || {{cellcolors|#eee|#b44|center}} | | 0x04 || 0x04 || {{cellcolors|#eee|#b44|center}} 0x05 | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} | ! {{cellcolors|#fff|#000}} Switch something | ||
| 0x05 || 0x05 || 0x06 | | 0x05 || 0x05 || 0x06 | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|- | |- | ||
! {{cellcolors|#c96|#000}} Delay | ! {{cellcolors|#c96|#000}} Delay VU xgkick by X cycles | ||
| 0x06 || 0x06 || 0x07 | | 0x06 || 0x06 || 0x07 | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" {{cellcolors|#c96|#000|center}} <abbr title="2=2cycles, 4=4cycles, 8=8cycles">cycles</abbr> | | colspan="3" {{cellcolors|#c96|#000|center}} <abbr title="2=2cycles, 4=4cycles, 8=8cycles">cycles</abbr> | ||
|- | |- | ||
! {{cellcolors|#c96|#000}} Patch | ! {{cellcolors|#c96|#000}} Patch VU memory by <abbr title="two bit masks for original and patched data">bitmask</abbr> | ||
| 0x07 || 0x07 || 0x08 | | 0x07 || 0x07 || 0x08 | ||
| 3 || style="text-align:left" | 8 * uint32_t | | 3 || style="text-align:left" | 8 * uint32_t | ||
| colspan="3" {{cellcolors|#c96|#000|center}} <abbr title="read mask, read mask, original opcode, original opcode, write mask, write mask, replace opcode, replace opcode">MASK</abbr> | | colspan="3" {{cellcolors|#c96|#000|center}} <abbr title="read mask, read mask, original opcode, original opcode, write mask, write mask, replace opcode, replace opcode">MASK</abbr> | ||
|- | |- | ||
! {{cellcolors|#9f9|#000}} Patch EE memory | ! {{cellcolors|#9f9|#000}} Patch EE memory with 2 opcodes | ||
| 0x08 || 0x08 || 0x09 | | 0x08 || 0x08 || 0x09 | ||
| <abbr title="command">1</abbr>→<abbr title="list">32</abbr> || style="text-align:left" | uint32_t + LIST | | <abbr title="command">1</abbr>→<abbr title="list">32</abbr> || style="text-align:left" | uint32_t + LIST | ||
| {{cellcolors|#9f9|#000|center}} <abbr title="amount of patches in the LIST">count</abbr> || colspan="2" {{cellcolors|#9f9|#000|center}} <abbr title="offset, original opcode, original opcode, replace opcode, replace opcode">LIST</abbr> | | {{cellcolors|#9f9|#000|center}} <abbr title="amount of patches in the LIST">count</abbr> || colspan="2" {{cellcolors|#9f9|#000|center}} <abbr title="offset, original opcode, original opcode, replace opcode, replace opcode">LIST</abbr> | ||
|- | |- | ||
! {{cellcolors|#9f9|#000}} Patch EE memory | ! {{cellcolors|#9f9|#000}} Patch EE memory with 1 opcode | ||
| {{NA}} || {{NA}} || 0x0A | | {{NA}} || {{NA}} || 0x0A | ||
| <abbr title="command">1</abbr>→<abbr title="list">32</abbr> || style="text-align:left" | uint32_t + LIST | | <abbr title="command">1</abbr>→<abbr title="list">32</abbr> || style="text-align:left" | uint32_t + LIST | ||
Line 1,544: | Line 1,473: | ||
| 0x0A || 0x0A || 0x0C | | 0x0A || 0x0A || 0x0C | ||
| 1 || style="text-align:left" | 2 * uint16_t | | 1 || style="text-align:left" | 2 * uint16_t | ||
| | | 0=?<br>1=?<br>2=? || colspan="2" | 0=?<br>0x180=?<br>0x400=?<br>0x800=? | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} Set something | ! {{cellcolors|#fff|#000}} Set something | ||
| 0x0B || 0x0B || 0x0D | | 0x0B || 0x0B || 0x0D | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | | | colspan="3" | 0=?<br>1=?(default?) | ||
|- | |- | ||
! {{cellcolors|#f93|#000}} COP2 and FPU accurate ADD/SUB address | ! {{cellcolors|#f93|#000}} COP2 and FPU accurate ADD/SUB address | ||
Line 1,559: | Line 1,488: | ||
| 0x0D || 0x0D || 0x0F | | 0x0D || 0x0D || 0x0F | ||
| 32 || style="text-align:left" | 2 * uint32_t | | 32 || style="text-align:left" | 2 * uint32_t | ||
| {{cellcolors|#f93|#000|center}} <abbr title="min 0x100000">start | | {{cellcolors|#f93|#000|center}} <abbr title="min 0x100000">start offset</abbr> || colspan="2" {{cellcolors|#f93|#000|center}} <abbr title="max 0x1FFFFFFF">end offset</abbr> | ||
|- | |- | ||
! {{cellcolors|#f93|#000}} | ! {{cellcolors|#f93|#000}} COP2 accurate MUL/DIV range | ||
| 0x0E || 0x0E || 0x10 | | 0x0E || 0x0E || 0x10 | ||
| 32 || style="text-align:left" | 2 * uint32_t | | 32 || style="text-align:left" | 2 * uint32_t | ||
| {{cellcolors|#f93|#000|center}} <abbr title="min 0x100000">start | | {{cellcolors|#f93|#000|center}} <abbr title="min 0x100000">start offset</abbr> || colspan="2" {{cellcolors|#f93|#000|center}} <abbr title="max 0x1FFFFFFF">end offset</abbr> | ||
|- | |- | ||
! {{cellcolors|#f93|#000}} VU0 accurate ADD/SUB address | ! {{cellcolors|#f93|#000}} VU0 accurate ADD/SUB address | ||
Line 1,571: | Line 1,500: | ||
| colspan="3" {{cellcolors|#f93|#000|center}} <abbr title="min 0x000, max 0xFF8">offset</abbr> | | colspan="3" {{cellcolors|#f93|#000|center}} <abbr title="min 0x000, max 0xFF8">offset</abbr> | ||
|- | |- | ||
! {{cellcolors|#588|#fff}} | ! {{cellcolors|#588|#fff}} VU related ? | ||
| 0x10 || 0x10 || 0x12 | | 0x10 || 0x10 || 0x12 | ||
| <abbr title="command">1</abbr>→<abbr title="list">63</abbr> || style="text-align:left" | uint32_t + LIST | | <abbr title="command">1</abbr>→<abbr title="list">63</abbr> || style="text-align:left" | uint32_t + LIST | ||
Line 1,581: | Line 1,510: | ||
| colspan="3" {{cellcolors|#dda|#000|center}} time ? | | colspan="3" {{cellcolors|#dda|#000|center}} time ? | ||
|- | |- | ||
! {{cellcolors|#f93|#000}} | ! {{cellcolors|#f93|#000}} VU1 transform ADD/SUB | ||
| 0x12 || 0x12 || 0x14 | | 0x12 || 0x12 || 0x14 | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} | ! {{cellcolors|#fff|#000}} Set something with bit flags | ||
| 0x13 || 0x13 || 0x15 | | 0x13 || 0x13 || 0x15 | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | 2 | | colspan="3" | 2=? (<abbr title="only valid for gxemu and softemu, when used in netemu the result is the same than using value 4">gxemu and softemu only</abbr>)<br>0x14=? (<abbr title="only valid for softemu, when used in netemu the result is the same than using value 4">softemu only</abbr>)<br>4=? | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} Unknown | ! {{cellcolors|#fff|#000}} Unknown | ||
| 0x14? || 0x14? || {{cellcolors|#eee|#b44|center}} | | 0x14? || 0x14? || {{cellcolors|#eee|#b44|center}} 0x16 | ||
| ? || style="text-align:left" | ? | | ? || style="text-align:left" | ? | ||
| colspan="3" | ? | | colspan="3" | ? | ||
|- | |- | ||
! {{cellcolors|#9cf|#000}} | ! {{cellcolors|#9cf|#000}} COP0 configure MTC0/MFC0 | ||
| 0x15 || 0x15 || 0x17 | | 0x15 || 0x15 || 0x17 | ||
| 1 || style="text-align:left" | uint8_t ? | | 1 || style="text-align:left" | uint8_t ? | ||
Line 1,602: | Line 1,531: | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} Switch something | ! {{cellcolors|#fff|#000}} Switch something | ||
| 0x16 || 0x16 || {{cellcolors|#eee|#b44|center}} | | 0x16 || 0x16 || {{cellcolors|#eee|#b44|center}} 0x18 | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
Line 1,611: | Line 1,540: | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} | ! {{cellcolors|#fff|#000}} Switch something | ||
| 0x17 || 0x18 || 0x1A | | 0x17 || 0x18 || 0x1A | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} | ! {{cellcolors|#fff|#000}} Switch something | ||
| 0x18 || 0x19 || 0x1B | | 0x18 || 0x19 || 0x1B | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
Line 1,634: | Line 1,563: | ||
| 0x1B || {{NA}} || 0x1E | | 0x1B || {{NA}} || 0x1E | ||
| 1 || style="text-align:left" | uint8_t | | 1 || style="text-align:left" | uint8_t | ||
| colspan="3" | ? | | colspan="3" | 3=? | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} | ! {{cellcolors|#fff|#000}} Set something | ||
| 0x1C || 0x1C || 0x1F | | 0x1C || 0x1C || 0x1F | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | | | colspan="3" | 200=?<br>1000=?(default) | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} Set something | ! {{cellcolors|#fff|#000}} Set something | ||
| 0x1D || 0x1D || 0x20 | | 0x1D || 0x1D || 0x20 | ||
| 1 || style="text-align:left" | uint64_t | | 1 || style="text-align:left" | uint64_t | ||
| colspan="3" | ? | | colspan="3" | 10=?<br>60=?(default)<br>100=?<br>120=?<br>200=?<br>240=? | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} Set something | ! {{cellcolors|#fff|#000}} Set something | ||
| 0x1E || 0x1E || 0x21 | | 0x1E || 0x1E || 0x21 | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | ? | | colspan="3" | 0=?<br>1=?<br>2=? | ||
|} | |||
</div> | |||
</div> | |||
<div style="float:right; width:50%;"> | |||
<div style="float:left; padding-left:5px;"> | |||
{| class="wikitable" style="font-size:85%; line-height:100%; text-align:center" | |||
|- | |||
! rowspan="2" | Command Name !! rowspan="39" style="padding:0px" | || colspan="3" | Command ID !! rowspan="39" style="padding:0px" | || rowspan="2" style="padding:1px" | Max<br>Usage !! rowspan="39" style="padding:0px" | || colspan="4" | Command Data | |||
|- | |- | ||
! {{cellcolors|#fff|#000}} Switch something | ! style="padding:1px" | gxemu !! style="padding:1px" | softemu !! style="padding:1px" | netemu !! Length !! colspan="3" | Params | ||
|- | |||
! {{cellcolors|#fff|#000}} Switch something | |||
| {{NA}} || 0x1F || 0x22 | | {{NA}} || 0x1F || 0x22 | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} | ! {{cellcolors|#fff|#000}} Switch something | ||
| 0x1F || 0x20 || 0x23 | | 0x1F || 0x20 || 0x23 | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|- | |- | ||
! {{cellcolors|#ddf|#000}} | ! {{cellcolors|#ddf|#000}} Internal image aspect ratio ? | ||
| 0x20 || 0x21 || 0x24 | | 0x20 || 0x21 || 0x24 | ||
| 1 || style="text-align:left" | uint64_t | | 1 || style="text-align:left" | uint64_t | ||
| colspan="3" | ? | | colspan="3" | 12000=?<br>48000=? | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} Switch something | ! {{cellcolors|#fff|#000}} Switch something | ||
| 0x21 || 0x22 || {{cellcolors|#eee|#b44|center}} | | 0x21 || 0x22 || {{cellcolors|#eee|#b44|center}} 0x25 | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
Line 1,674: | Line 1,613: | ||
| 0x22 || 0x23 || 0x26 | | 0x22 || 0x23 || 0x26 | ||
| 32 || style="text-align:left" | 2 * uint32_t | | 32 || style="text-align:left" | 2 * uint32_t | ||
| {{cellcolors|#f93|#000|center}} <abbr title="min 0x100000">start | | {{cellcolors|#f93|#000|center}} <abbr title="min 0x100000">start offset</abbr> || colspan="2" {{cellcolors|#f93|#000|center}} <abbr title="max 0x1FFFFFFF">end offset</abbr> | ||
|- | |- | ||
! {{cellcolors|#f93|#000}} COP2 accurate ADD/SUB range | ! {{cellcolors|#f93|#000}} COP2 accurate ADD/SUB range | ||
| 0x23 || 0x24 || 0x27 | | 0x23 || 0x24 || 0x27 | ||
| 32 || style="text-align:left" | 2 * uint32_t | | 32 || style="text-align:left" | 2 * uint32_t | ||
| {{cellcolors|#f93|#000|center}} <abbr title="min 0x100000">start | | {{cellcolors|#f93|#000|center}} <abbr title="min 0x100000">start offset</abbr> || colspan="2" {{cellcolors|#f93|#000|center}} <abbr title="max 0x1FFFFFFF">end offset</abbr> | ||
|- | |- | ||
! {{cellcolors|#aaf|#000}} Set something <abbr title="PS2 MECHACON related">(CDVD)</abbr> | ! {{cellcolors|#aaf|#000}} Set something <abbr title="PS2 MECHACON related">(CDVD)</abbr> | ||
| 0x24 || 0x25? || 0x28 | | 0x24? || 0x25? || 0x28 | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | ? | | colspan="3" | 0=?<br>1=?<br>2=?<br>3=? | ||
|- | |- | ||
! {{cellcolors|#aaf|#000}} CDVD seek | ! {{cellcolors|#aaf|#000}} CDVD read/seek timings ? | ||
| 0x25 || 0x26? || 0x29 | | 0x25? || 0x26? || 0x29 | ||
| 1 || style="text-align:left" | 2 * uint32_t | | 1 || style="text-align:left" | 2 * uint32_t | ||
| ? || colspan="2" | ? | | ? || colspan="2" | ? | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} Switch something | ! {{cellcolors|#fff|#000}} Switch something | ||
| 0x26 || 0x27 || 0x2A | | 0x26? || 0x27 || 0x2A | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|- | |- | ||
! {{cellcolors|#aaf|#000}} | ! {{cellcolors|#aaf|#000}} Switch something <abbr title="PS2 MECHACON related">(CDVD)</abbr> | ||
| 0x27? || 0x28 || 0x2B | | 0x27? || 0x28 || 0x2B | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
Line 1,704: | Line 1,643: | ||
| 0x28 || 0x29 || 0x2C | | 0x28 || 0x29 || 0x2C | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | ? | | colspan="3" | 1=? | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} Switch something | ! {{cellcolors|#fff|#000}} Switch something | ||
| 0x29? || 0x2A || {{cellcolors|#eee|#b44|center}} | | 0x29? || 0x2A || {{cellcolors|#eee|#b44|center}} 0x2D | ||
| 1 || style="text-align:left" | 0 | | 1 || style="text-align:left" | 0 | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
Line 1,714: | Line 1,653: | ||
| 0x2A || 0x2B || 0x2E | | 0x2A || 0x2B || 0x2E | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | ? | | colspan="3" | 0x172=? | ||
|- | |- | ||
! {{cellcolors|#fff|#000}} | ! {{cellcolors|#fff|#000}} Set something | ||
| 0x2B || {{NA}} || 0x2F | | 0x2B || {{NA}} || 0x2F | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | 1=? | |||
|- | |||
! {{cellcolors|#fff|#000}} Unknown | |||
| {{NA}} || {{NA}} || {{cellcolors|#eee|#b44|center}} 0x30<br>0x31<br>0x32<br>0x33<br>0x34 | |||
| ? || style="text-align:left" | ? | |||
| colspan="3" | ? | | colspan="3" | ? | ||
|- | |- | ||
! {{cellcolors|#f66|#000}} Enable Force Flip Field | ! {{cellcolors|#f66|#000}} Enable Force Flip Field | ||
Line 1,731: | Line 1,670: | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|- | |- | ||
! {{cellcolors|# | ! {{cellcolors|#fff|#000}} Unknown | ||
| {{ | | {{NA}} || {{NA}} || {{cellcolors|#eee|#b44|center}} 0x36<br>0x37<br>0x38<br>0x39<br>0x3A<br>0x3B<br>0x3C | ||
| | | ? || style="text-align:left" | ? | ||
| colspan="3" | | colspan="3" | ? | ||
|- | |- | ||
! {{cellcolors|#c96|#000}} Config revision | ! {{cellcolors|#c96|#000}} Config revision | ||
Line 1,769: | Line 1,708: | ||
| {{NA}} || {{NA}} || 0x43 | | {{NA}} || {{NA}} || 0x43 | ||
| 1 || style="text-align:left" | uint32_t | | 1 || style="text-align:left" | uint32_t | ||
| colspan="3" | ? | | colspan="3" | 0=?(default)<br>1=? | ||
|- | |- | ||
! {{cellcolors|#fcc|#000}} Disable smoothing filter | ! {{cellcolors|#fcc|#000}} Disable smoothing filter | ||
Line 1,836: | Line 1,775: | ||
| colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | | colspan="3" {{cellcolors|#ddd|#666|center}} ''Nothing'' | ||
|} | |} | ||
</div> | |||
</div> | |||
</div> | |||
<br style="clear: both;" /> | |||
<!-- We need to find a better way to organize the commands info below, right now all the info is "constricted" inside the same table but is better to take them out of the table to have more freedon when adding comments, etc... Are a lot so by now i prefer to dont make page sections for every command. Im going to try something that visually looks like page sections but are not (so are not going to be displayed in the TOC at top of the page). With this change we are moving forward because the command info is not going to be inside the same table anymore, im going to split them but the visual look and other details are not going to be definitive because later can be converted into page sections if someone insists in it --> | <!-- We need to find a better way to organize the commands info below, right now all the info is "constricted" inside the same table but is better to take them out of the table to have more freedon when adding comments, etc... Are a lot so by now i prefer to dont make page sections for every command. Im going to try something that visually looks like page sections but are not (so are not going to be displayed in the TOC at top of the page). With this change we are moving forward because the command info is not going to be inside the same table anymore, im going to split them but the visual look and other details are not going to be definitive because later can be converted into page sections if someone insists in it --> | ||
{{Boxcomm|id=0x00|name=Title ID Enforce | {{Boxcomm|id=0x00|name=Title ID Enforce|data=1x String in format: ABCD-12345}} | ||
Restricts the CONFIG to be used only by a specific [[Template:TITLE_ID_for_Physical_Media|Title ID]] | Restricts the CONFIG to be used only by a specific [[Template:TITLE_ID_for_Physical_Media|Title ID]]<br> | ||
The presence of this command in the CONFIG is optional. If present it needs to be located always at the last position in the CONFIG | The presence of this command in the CONFIG is optional. If present it needs to be located always at the last position in the CONFIG | ||
{{Boxcomm|id=0x01|name=EE_ADD_HOOK|data=2x uint32_t Params (addr, func_id 0-0x3B)}} | {{Boxcomm|id=0x01|name=EE_ADD_HOOK|data=2x uint32_t Params (addr, func_id 0-0x3B)}} | ||
Line 1,868: | Line 1,792: | ||
The Maximum Amount of times netemu command 0x01 can be used consecutivelly in the same config is 255. This is actually limit for EE hooks at all, 0x01 don't have own limit. | The Maximum Amount of times netemu command 0x01 can be used consecutivelly in the same config is 255. This is actually limit for EE hooks at all, 0x01 don't have own limit. | ||
{| class="wikitable" style="width:100%; font-size:0.9em; line-height:90%" | {| class="wikitable" style="width:100%; font-size:0.9em; line-height:90%" | ||
|- | |- | ||
!Function ID!! Notes | !Function ID!! Notes | ||
|- | |- | ||
|0x00|| | |0x00|| | ||
|- | |- | ||
|0x01|| FIFA 2000 use it as hook for EE kernel at 0x80001858 (DMAC related) | |0x01|| FIFA 2000 use it as hook for EE kernel at 0x80001858 (DMAC related). | ||
|- | |- | ||
|0x02|| | |0x02|| | ||
Line 1,886: | Line 1,809: | ||
|- | |- | ||
|0x04|| Castle Shikigami II | |0x04|| Castle Shikigami II | ||
store 0 on 0x94A290 (EMU Memory) | |||
|- | |- | ||
|0x05|| | |0x05|| Star Wars games developed by Pandemic Studios (freeze fix), Worms 3D and NBA 08. | ||
|- | |- | ||
|0x06|| | |0x06|| | ||
|- | |- | ||
|0x07|| | |0x07|| | ||
|- | |- | ||
|0x08|| | |0x08|| Harry Potter - Quidditch World Cup US use it at offset 0x2BD45C (EE) | ||
|- | |- | ||
|0x09|| | |0x09|| Harry Potter - Quidditch World Cup US use it at offset 0x2BD620 (EE) | ||
|- | |- | ||
|0x0A|| | |0x0A|| | ||
|- | |- | ||
|0x0B|| | |0x0B|| | ||
|- | |- | ||
|0x0C|| Piglet's Big Game | |0x0C|| Piglet's Big Game | ||
Line 1,912: | Line 1,829: | ||
|0x0D|| usleep(100) | |0x0D|| usleep(100) | ||
|- | |- | ||
|0x0E|| Used 3 times in Need for Speed - Carbon [Collector's Edition] US | |0x0E|| Used 3 times in Need for Speed - Carbon [Collector's Edition] US | ||
|- | |- | ||
|0x0F|| | |0x0F|| | ||
Grand Theft Auto 3 (SLUS-20062) | Grand Theft Auto 3 (SLUS-20062) | ||
using 0x348B40, 0x18E1F0, 0x348EC8 ( + 200000000 base ) | using 0x348B40, 0x18E1F0, 0x348EC8 ( + 200000000 base ) | ||
Line 1,925: | Line 1,838: | ||
0x348EC8 = Almost end (only loading values preserved on stack) of CTheScripts::ClearSpaceForMissionEntity((CVector const &, CEntity *)) | 0x348EC8 = Almost end (only loading values preserved on stack) of CTheScripts::ClearSpaceForMissionEntity((CVector const &, CEntity *)) | ||
|- | |- | ||
|0x10|| | |0x10|| | ||
Grand Theft Auto 3 (SLES-50330) | Grand Theft Auto 3 (SLES-50330), uses 0x349790, 0x10 (somewhat floats related) | ||
using 0x349790, 0x18E1F0, 0x349B18 ( + 200000000 base ) | using 0x349790, 0x18E1F0, 0x349B18 ( + 200000000 base ) | ||
0x349790 = start CTheScripts::ClearSpaceForMissionEntity((CVector const &, CEntity *)) | 0x349790 = start CTheScripts::ClearSpaceForMissionEntity((CVector const &, CEntity *)) | ||
Line 1,932: | Line 1,845: | ||
0x349B18 = Almost end (only loading values preserved on stack) of CTheScripts::ClearSpaceForMissionEntity((CVector const &, CEntity *)) | 0x349B18 = Almost end (only loading values preserved on stack) of CTheScripts::ClearSpaceForMissionEntity((CVector const &, CEntity *)) | ||
|- | |- | ||
|0x11|| | |0x11|| | ||
Grand Theft Auto 3 (SLES-50793) | Grand Theft Auto 3 (SLES-50793) | ||
using 0x3495C0, 0x18E1F0, 0x349948 ( + 200000000 base ) | using 0x3495C0, 0x18E1F0, 0x349948 ( + 200000000 base ) | ||
Line 1,940: | Line 1,853: | ||
|- | |- | ||
|0x12|| Disney/Pixar Finding Nemo (fixes the pause menu freeze) | |0x12|| Disney/Pixar Finding Nemo (fixes the pause menu freeze) | ||
if | if condition met... | ||
store 0 in [ 0x204FC500 + 200000000 base] 0x4FC500 EE memory | store 0 in [ 0x204FC500 + 200000000 base] 0x4FC500 EE memory | ||
|- | |- | ||
|0x13|| Snowblind Engine specific fix. Applies to the beginning of function called initLump. Config is responsible for grabbing data from one of registers for use in 0x14/0x15 hooks. Mentioned data is EE memory offset, if data from 0x13 is 0, 0x14/0x15 don't apply. | |0x13|| Snowblind Engine specific fix. Applies to the beginning of function called initLump. Config is responsible for grabbing data from one of registers for use in 0x14/0x15 hooks. Mentioned data is EE memory offset, if data from 0x13 is 0, 0x14/0x15 don't apply. | ||
Line 1,953: | Line 1,866: | ||
store 0x010C9E40 in [ 0x208EAB6C + 200000000 base] | store 0x010C9E40 in [ 0x208EAB6C + 200000000 base] | ||
|- | |- | ||
|0x17|| | |0x17|| | ||
condition r18 == 0x8000 | |||
setting: | |||
stores 0x40490FDA somewhere | |||
Note: 0x40490FDA (3.14159250) is the highest float approximation to π in hexadecimal without going over the value.<br /> | |||
Probably can improve FPU accuracy for some games. | |||
|- | |- | ||
|0x18|| Okami PAL specific hook. | |0x18|| Okami PAL specific hook. | ||
Line 1,974: | Line 1,889: | ||
Whole thing looks like HLE version of noped functions. | Whole thing looks like HLE version of noped functions. | ||
|- | |- | ||
|0x19|| | |0x19|| | ||
|- | |- | ||
|0x1A|| | |0x1A|| | ||
store 0 in [ 0x209FD560 + 200000000 base] | store 0 in [ 0x209FD560 + 200000000 base] | ||
store 0 in [ 0x209F9550 + 200000000 base] | store 0 in [ 0x209F9550 + 200000000 base] | ||
Line 2,036: | Line 1,948: | ||
|- | |- | ||
|0x2B|| | |0x2B|| | ||
|- | |- | ||
|0x2C|| Shin Onimusha - Dawn of Dreams Fix IPU | |0x2C|| Shin Onimusha - Dawn of Dreams Fix ingame IPU runtime - JPN/US release [https://github.com/PCSX2/pcsx2/issues/1141 bug] | ||
|- | |- | ||
|0x2D|| Shin Onimusha - Dawn of Dreams Fix IPU | |0x2D|| Shin Onimusha - Dawn of Dreams Fix ingame IPU runtime - PAL release [https://github.com/PCSX2/pcsx2/issues/1141 bug] | ||
|- | |- | ||
|0x2E|| Shin Onimusha - Dawn of Dreams Fix IPU | |0x2E|| Shin Onimusha - Dawn of Dreams Fix ingame IPU runtime - Unk release (SCKA-20086? SLPM-66275? Why it is unused? Why non PS2 Best JPN release is missing hook?) | ||
|- | |- | ||
|0x2F|| | |0x2F|| | ||
condition [ 0x37B0C4 + 200000000 base ] == 0 -> 00 10 0B 98 | |||
|- | |- | ||
|0x30|| | |0x30|| | ||
condition [ 0x37B704 + 200000000 base ] == 0 -> 00 10 0B 98 | |||
|- | |- | ||
|0x31|| | |0x31|| | ||
condition [ 0x37630C + 200000000 base ] == 0 -> 00 10 0B A8 | |||
|- | |- | ||
|0x32|| | |0x32|| | ||
condition [ 0x37BB0C + 200000000 base ] == 0 -> 00 10 0B A8 | |||
|- | |- | ||
|0x33|| | |0x33|| | ||
Line 2,072: | Line 1,979: | ||
|0x38|| | |0x38|| | ||
|- | |- | ||
|0x39|| Used silently in command 0x4B with first param from 0x4B as hook address | |0x39|| Used silently in command 0x4B with first param from 0x4B as hook address. | ||
|- | |- | ||
|0x3A|| Used silently in command 0x4C with first param from 0x4C as hook address | |0x3A|| Used silently in command 0x4C with first param from 0x4C as hook address. | ||
|- | |- | ||
|0x3B|| Grand Theft Auto 3 ( | |0x3B|| Grand Theft Auto 3 (JP/AS) ? using 0x351210, 0x18F590, 0x351568 ( + 200000000 base ) | ||
|} | |} | ||
{{Boxcomm|id=0x02|name=Unknown|data=1x int32}} | {{Boxcomm|id=0x02|name=Unknown|data=1x int32}} | ||
Line 2,092: | Line 1,994: | ||
{{Boxcomm|id=0x03|name=Unknown|data=N/A}} | {{Boxcomm|id=0x03|name=Unknown|data=N/A}} | ||
Sets something 0 | |||
{{Boxcomm|id=0x04|name=Unknown|data=1x uint32_t index (i*0x80, special 0x12345: 0x91a280?)}} | {{Boxcomm|id=0x04|name=Unknown|data=1x uint32_t index (i*0x80, special 0x12345: 0x91a280?)}} | ||
Line 2,118: | Line 2,020: | ||
**1 [Dark Cloud] and [Dead Or Alive 2 Hardcore] | **1 [Dark Cloud] and [Dead Or Alive 2 Hardcore] | ||
{{Boxcomm|id=0x0A|name=EE_INSN_REPLACE32|data=uint32_t count, <List> ( | {{Boxcomm|id=0x0A|name=EE_INSN_REPLACE32|data=uint32_t count, <List> (offset, original opcode, replace opcode)}} | ||
Command present only in the ps2_netemu. Maximum List Count: 32 | Command present only in the ps2_netemu. Maximum List Count: 32 | ||
*Valid values found | |||
* | **1 [Deadly Strike] | ||
* | **2 [Dragon Force] | ||
* | |||
{{Boxcomm|id=0x0B|name=MECHA_SET_PATCH|data=1x uint32_t count, <List> {sector id, offset, sizeof present opcodes, replace opcodes, original opcodes)}} | {{Boxcomm|id=0x0B|name=MECHA_SET_PATCH|data=1x uint32_t count, <List> {sector id, offset, sizeof present opcodes, replace opcodes, original opcodes)}} | ||
Line 2,152: | Line 2,051: | ||
{{Boxcomm|id=0x0C|name=Unknown|data=1x (uint16_t, uint16_t)}} | {{Boxcomm|id=0x0C|name=Unknown|data=1x (uint16_t, uint16_t)}} | ||
0/1/2,<0x63> | |||
{{Boxcomm|id=0x0D|name=Unknown|data=1x int32}} | {{Boxcomm|id=0x0D|name=Unknown|data=1x int32}} | ||
True/false. Default = 1 | True/false. Default = 1 | ||
0 = Skip some IOP related code responsible for check value from IOP SPE LS 0x2C0C0 (and skip panic if value is 0 or -1). | 0 = Skip some IOP related code responsible for check value from IOP SPE LS 0x2C0C0 (and skip panic if value is 0 or -1). | ||
Also skip write of | Also skip write of 0x80000000 to unknown place related to IOP memory (to 0x4005400C). | ||
{{Boxcomm|id=0x0E|name=Improves ADD/SUB accuracy|data=1x int32}} | {{Boxcomm|id=0x0E|name=Improves ADD/SUB accuracy|data=1x int32}} | ||
Line 2,189: | Line 2,087: | ||
because at some point they are used to "andc" with first 4 bytes. | because at some point they are used to "andc" with first 4 bytes. | ||
Some examples for first 4 bytes: | Some examples for first 4 bytes: | ||
0x100000 = Different code path for VU0 opcodes that do ADD/SUB with multiply (MSUB, MADDA, etc.). | |||
0x200000 = Run some additional code in VU0 load/store opcodes (ILW, LQI, ISWR, etc.) | |||
0x200000 = Run some additional code in VU0 load/store opcodes (ILW, LQI, ISWR, etc.) | |||
0x400000 = Skip emu syscall 3 (3) | 0x400000 = Skip emu syscall 3 (3) | ||
0x800000 = Skip emu syscall 3 (4) | 0x800000 = Skip emu syscall 3 (4) | ||
0x4000000 = | 0x4000000 = This flag ensure that type 2 config from cmd 0x12 will run. Otherwise it seems to be skipped. | ||
0x8000000 = | 0x8000000 = Run some additional code for VU0 DIV opcode | ||
0x30000000 = Different code path for VU0 MUL opcodes, include opcodes like MSUB for mul part. So 0x30100000 work for mul, and sub part. | |||
0x10000000 and 0x20000000 also work for that purpose, emu just check for any active bits after applying 0x30000000 mask. | |||
Keep in mind that you still need to use at least 8 bytes for cmd 0x12, just use 00 for bytes 5,6,7,8. | Keep in mind that you still need to use at least 8 bytes for cmd 0x12, just use 00 for bytes 5,6,7,8. | ||
Later bits are dependent on which subcommand we want to run. | Later bits are dependent on which subcommand we want to run. | ||
Line 2,222: | Line 2,113: | ||
{{Boxcomm|id=0x15|name=Unknown|data=1 Param ( <1, >1 )}} | {{Boxcomm|id=0x15|name=Unknown|data=1 Param ( <1, >1 )}} | ||
Patch SPE 0 (IOP) program in local memory. Command search for absolute branches in LS 0x3A2C0 - 0x3A6C0 and patch | Patch SPE 0 (IOP) program in local memory. Command search for absolute branches in LS 0x3A2C0 - 0x3A6C0 and patch them to bi r127. This command take partially unused value. Value 0,1 do nothing, values 2 and above run command. Doesn't matter is 2,4, or 10. Nothing will change in command behavior. | ||
[Bloodrayne 2] uses 4 | [Bloodrayne 2] uses 4 | ||
[GRIMgRiMoiRe] uses 4 | [GRIMgRiMoiRe] uses 4 | ||
Line 2,229: | Line 2,119: | ||
[Odin Sphere] uses 4 | [Odin Sphere] uses 4 | ||
[SMT Persona 3 FES] uses 4 | [SMT Persona 3 FES] uses 4 | ||
{{Boxcomm|id=0x16|name=N/A|data=N/A}} | {{Boxcomm|id=0x16|name=N/A|data=N/A}} | ||
Command not available in ps2_netemu.self | Command not available in ps2_netemu.self | ||
Line 2,285: | Line 2,175: | ||
{{Boxcomm|id=0x1F|name=Unknown|data=1x uint32_t}} | {{Boxcomm|id=0x1F|name=Unknown|data=1x uint32_t}} | ||
Default 1 | Default 1 | ||
Config value is added to another value, and stored later in negmem. For sure this is VIF0 related command, and can be VIF0 timing/cycle related. | |||
{{Boxcomm|id=0x20|name=Unknown|data=1x uint64_t}} | {{Boxcomm|id=0x20|name=Unknown|data=1x uint64_t}} | ||
Line 2,298: | Line 2,182: | ||
Is worth to note that 0x3C is default multiplier even for PAL titles, so is not stricly related to framerate, | Is worth to note that 0x3C is default multiplier even for PAL titles, so is not stricly related to framerate, | ||
but to vsync counters (where 0x3C is still wrong anyway..). Result of multiply is also compared at some point to vsync delay value. | but to vsync counters (where 0x3C is still wrong anyway..). Result of multiply is also compared at some point to vsync delay value. | ||
{{Boxcomm|id=0x21|name=Unknown|data=1x uint32_t}} | {{Boxcomm|id=0x21|name=Unknown|data=1x uint32_t}} | ||
0 = sets an option from 1 to 0 and another one to 0, | |||
1 = sets an option from 1 to 0 and another one to 1, | |||
2 = sets an option from 1 to 1 and another one to 0 | |||
0 = sets an option | |||
1 = sets an option | |||
2 = sets an option | |||
[Fatal Frame II] uses 0 | [Fatal Frame II] uses 0 | ||
[Grand Theft Auto Vice City] uses 1 | [Grand Theft Auto Vice City] uses 1 | ||
Line 2,321: | Line 2,200: | ||
{{Boxcomm|id=0x24|name=Unknown|data=1x uint64_t}} | {{Boxcomm|id=0x24|name=Unknown|data=1x uint64_t}} | ||
SIO2 related | SIO2 related | ||
{{Boxcomm|id=0x25|name=N/A|data=N/A}} | {{Boxcomm|id=0x25|name=N/A|data=N/A}} | ||
Command not available in ps2_netemu.self | Command not available in ps2_netemu.self | ||
Line 2,347: | Line 2,224: | ||
{{Boxcomm|id=0x28|name=Unknown|data=1x uint32_t}} | {{Boxcomm|id=0x28|name=Unknown|data=1x uint32_t}} | ||
<=3 | <=3 | ||
{{Boxcomm|id=0x29|name=Unknown|data=2x uint32_t}} | {{Boxcomm|id=0x29|name=Unknown|data=2x uint32_t}} | ||
Seek time | Seek/read time? Maybe seek/read delay? Full/fast seek? Default value is 0x1F40, 0xBB80 (8000, 48000) | ||
{{Boxcomm|id=0x2A|name=Unknown|data=N/A}} | {{Boxcomm|id=0x2A|name=Unknown|data=N/A}} | ||
Line 2,370: | Line 2,246: | ||
{{Boxcomm|id=0x2E|name=Unknown|data=1x uint32_t}} | {{Boxcomm|id=0x2E|name=Unknown|data=1x uint32_t}} | ||
{{Boxcomm|id=0x2F|name=Unknown|data=1x uint32_t}} | {{Boxcomm|id=0x2F|name=Unknown|data=1x uint32_t}} | ||
Line 2,418: | Line 2,293: | ||
{{Boxcomm|id=0x3D|name=Config revision|data=1x uint32_t}} | {{Boxcomm|id=0x3D|name=Config revision|data=1x uint32_t}} | ||
This command works as a restriction, the emulator loads the config contents '''only''' if the '''emulator revision''' is bigger than the '''config revision'''. See: [[PS2_Emulation#PS2 Emulator Types and Revisions|PS2 Emulator Types and Revisions]]<br> | |||
The goal of this restriction is to prevent the emulator to load a config containing unsupported commands, as example netemu command 0x50 is only supported since netemu revision 17495 (shipped with PS3 firmware 4.78 or newer), otherway if you try to load a config with a revision higher than your netemu revision the contents of the config are going to be ignored (as example when trying to load a modern config using commands higher than 0x41 in a custom firmware 3.70)<br> | |||
In general is better to use a low revision with this command to lower the restriction as most as posible (oldest netemu revision is 15686), but '''only''' if the commands inside the config are not higher than 0x41, for a reference when creating custom configs check the table below, those are the minimal '''config revisions''' required that depends of the config commands contents | |||
{| class="wikitable" style="font-size:1em; line-height:1em" | {| class="wikitable" style="font-size:1em; line-height:1em" | ||
Line 2,425: | Line 2,302: | ||
|- | |- | ||
| Up to 0x41 || 15686 || 3.70 or newer | | Up to 0x41 || 15686 || 3.70 or newer | ||
|- | |- | ||
| Up to 0x43 || 16604 || 4.20 or newer | | Up to 0x43 || 16604 || 4.20 or newer | ||
Line 2,442: | Line 2,317: | ||
| Up to 0x50 || 17495 || 4.78 or newer | | Up to 0x50 || 17495 || 4.78 or newer | ||
|} | |} | ||
*Problems: | |||
**The [[PS2 Official Configs|official NET config]] for Gradius V (SLPM-62462) uses config revision = 17498 (is the highest value ever found in a official PS2 classic config), this value is higher than any retail ps2_netemu.self revision, and is breaking the logic of the [[Template:Ps2configrev]] (used to calculate the PS3 firmware version required by the config). So either... 1) the description of this command written above is not accurate enought, or 2) the config has been "faked" to an incorrect revision, or 3) the config is real but sony made a mistake with the revision and the emulator is not loading it | |||
{{Boxcomm|id=0x3E|name=Unknown|data=N/A}} | {{Boxcomm|id=0x3E|name=Unknown|data=N/A}} | ||
Line 2,449: | Line 2,326: | ||
{{Boxcomm|id=0x3F|name=Unknown|data=1x uint32_t}} | {{Boxcomm|id=0x3F|name=Unknown|data=1x uint32_t}} | ||
Store value on 0x2B700 of SPE 0 (IOP) LS | Store value on 0x2B700 of SPE 0 (IOP) LS. | ||
{{Boxcomm|id=0x40|name=Unknown|data=N/A}} | {{Boxcomm|id=0x40|name=Unknown|data=N/A}} | ||
Line 2,464: | Line 2,341: | ||
{{Boxcomm|id=0x42|name=EE Overlay patch|data=2 main Params + patch data: uint32_t address, uint32_t count, opcode,opcode,opcode...}} | {{Boxcomm|id=0x42|name=EE Overlay patch|data=2 main Params + patch data: uint32_t address, uint32_t count, opcode,opcode,opcode...}} | ||
Applied on game start | Applied on game start, if game overwrite selected part of memory, it will wipe 0x42 patch. See [[Special:Diff/67828/67858]] | ||
Start address can be (in theory) anywhere, but Sony used the 0xFF000 - 0xFFFFC range for this purpose. | Start address can be (in theory) anywhere, but Sony used the 0xFF000 - 0xFFFFC range for this purpose. | ||
Count is size of patch in 4 bytes opcodes. So 5 opcode patch = count 5. | Count is size of patch in 4 bytes opcodes. So 5 opcode patch = count 5. | ||
Line 2,527: | Line 2,404: | ||
{{Boxcomm|id=0x49|name=Unknown|data=N/A}} | {{Boxcomm|id=0x49|name=Unknown|data=N/A}} | ||
Sets something 0xB,0,0 | |||
Trapt | Trapt | ||
Line 2,538: | Line 2,415: | ||
For proper config we need at least 2 (can be more if needed) 0x4B commands, one to enable redirect, one to disable. | For proper config we need at least 2 (can be more if needed) 0x4B commands, one to enable redirect, one to disable. | ||
First param is EE memory offset that when is hit enable/disable redirection. | First param is EE memory offset that when is hit enable/disable redirection. | ||
Second param is | Second param is partially unknown, seems to be size of next param to read * 4 (3 in known configs), or 0xFFFFFFFF for disable redirect command. | ||
Third param is ID of SAVEDATA we want to use padded with 00 to match 12 bytes, or all 00 in disable redirect config. | Third param is ID of SAVEDATA we want to use padded with 00 to match 12 bytes, or all 00 in disable redirect config. | ||
Important note here is that config have own 00 00 00 00 terminator at the end. | Important note here is that config have own 00 00 00 00 terminator at the end. | ||
So after 12 bytes of ID we need to add 4 bytes of 00. That apply also to disable redirect version. | So after 12 bytes of ID we need to add 4 bytes of 00. That apply also to disable redirect version. | ||
{{Boxcomm|id=0x4C|name=Unknown|data=2x uint32_t + ID: offset, int, char[]}} | {{Boxcomm|id=0x4C|name=Unknown|data=2x uint32_t + ID: offset, int, char[]}} | ||
Used to redirect to different ISO without game reset. First param is EE offset to hook, second param is ID size * 4. Emulator do some checks here, safe value is 3 (3 * 4 bytes), third value is ID in big endian hex ascii (eg. NPJD12345), additionally 0x4C expect own 00 00 00 00 terminator. To eventually end redirection use another 0x4C but with (offset, 0xFFFFFFFF, 4 * 0x00000000 . This config have very similar usage to 0x4B, just redirect to different iso, instead to different MC. Currently is unknown that cobra patched emulators support that config properly. | |||
{{Boxcomm|id=0x4D|name=Unknown|data=1x uint32_t}} | {{Boxcomm|id=0x4D|name=Unknown|data=1x uint32_t}} | ||
Param is | Param is MASK used in some conversion of Q value in RGBAQ writes. Default value 0. | ||
tempQ = Q & 0x7FFFFFFF | |||
tempQ = tempQ & MASK | |||
Q = tempQ | unmasked Q | |||
Wild Arms: The Fifth Vanguard uses 0x3F800000 | |||
Wild Arms: The Fifth Vanguard uses 0x3F800000 | |||
{{Boxcomm|id=0x4E|name=Unknown|data=Unknown}} | {{Boxcomm|id=0x4E|name=Unknown|data=Unknown}} | ||
Line 2,657: | Line 2,517: | ||
! Bug !! Description !! Known Affected Games | ! Bug !! Description !! Known Affected Games | ||
|- | |- | ||
| Missing Emotion Engine Data Cache emulation || Emulating that is literally not possible without making games run at 3 fps. Fixed by patches to game image, or EE code. Instruction Cache (not Data) seems to | | Missing Emotion Engine Data Cache emulation || Emulating that is literally not possible without making games run at 3 fps. Fixed by patches to game image, or EE code. Only known game that need Instruction Cache (not Data) seems to work fine, but this not necessarily mean that emu support I Cache emulation. Mentioned game is WRC4, and there are possible other bugs that allow it to run (not invalidating recompiler block). || Ice Age 2, DOA2: Extreme, Nascar 2009. | ||
|- | |- | ||
| Branch delay slot violation not supported on EE || Some games have Branch instruction inside Branch delay slots, this is not emulated correctly on EE (VU have proper emulation of that). This is patched in configs by rearangging MIPS code. || WRC 3,4,Rally Evolved, one of Action Replay discs. | | Branch delay slot violation not supported on EE || Some games have Branch instruction inside Branch delay slots, this is not emulated correctly on EE (VU have proper emulation of that). This is patched in configs by rearangging MIPS code. || WRC 3,4,Rally Evolved, one of Action Replay discs. | ||
|- | |- | ||
| VIF bugs || There is no correct timing, and queuing for some VIF commands like MSCAL. || Snowblind Engine games. Probably more. | | VIF bugs || There is no correct timing, and queuing for some VIF commands like MSCAL. || Snowblind Engine games. Probably more. | ||
Line 2,669: | Line 2,527: | ||
| COP2 instructions are instant || Some games rely on fact that COP2 operations can take some time, on PS3 emulators they are done instantly due to lack of correctly emulated pipeline Patched by rearranging mips code || FFX, FFX-2, Ghost in The Shell SAC, Ace Combat series, Sprint Cars 1/2, Black, Run Like Hell, Everblue 2, Dragon Quest - Shounen Yangus no Fushigi na Daibouken, and many more | | COP2 instructions are instant || Some games rely on fact that COP2 operations can take some time, on PS3 emulators they are done instantly due to lack of correctly emulated pipeline Patched by rearranging mips code || FFX, FFX-2, Ghost in The Shell SAC, Ace Combat series, Sprint Cars 1/2, Black, Run Like Hell, Everblue 2, Dragon Quest - Shounen Yangus no Fushigi na Daibouken, and many more | ||
|- | |- | ||
| VU0 is not running in sync with EE core || VU0 is running | | VU0 is not running in sync with EE core || Seems like old pcsx2 mVU approach is used where VU0 is running thousands of cycles ahead of EE. Partially resolved on emu using 0x12 command with 2/3 subcommands. || 24 The Game, ATV Quad Power Racing 2, Twisted Metal Head-On, Primal, Ghosthunter, Rayman Arena, Rayman 3, All games using M-bit. | ||
|- | |- | ||
| M-Bit not supported || Emulator ignore VU0 M-Bit, that cause issues for games that need it to work correctly. This is done because there is no way to sync correctly running VU0 without sync with EE. Partially resolved on emu using 0x12 command with 2/3 subcommands | | M-Bit not supported || Emulator ignore VU0 M-Bit, that cause issues for games that need it to work correctly. This is done because there is no way to sync correctly running VU0 without sync with EE. Partially resolved on emu using 0x12 command with 2/3 subcommands. || Totally Spies! Totally Party, Mike Tyson Heavyweight Boxing, My Street, Crash Twinsanity, Marvel Nemesis, Panzer Elite Action - Fields of Glory, TriAce games (speed optimizations only), Super Monkey Ball Adventure, most Eko Software games, and many more. | ||
|- | |- | ||
| Emulator Fail to save correct flag instances while ending VU0 program on Ebit || This cause few games to read bad flag status (not status flag!) on COP2. This is resolved on emu by forcing update of MAC flag on every STATUS flag read (by config 0x12), this cause slowdowns creating a lot of unnesessary operations. || Driving Emotion Type-S, State of Emergency 2, The Getaway Black Monday. | |||
|- | |- | ||
| Not updated status flag when VDIV/VSQRT/VRSQRT is done on COP2 || Potential bad flag state can cause a lot of issues that are not related on first sight || Yanya Caballista (already patched by custom config) | | Not updated status flag when VDIV/VSQRT/VRSQRT is done on COP2 || Potential bad flag state can cause a lot of issues that are not related on first sight || Yanya Caballista (already patched by custom config) | ||
|- | |- | ||
| In corner cases emu select wrong block | | In corner cases emu select wrong block pipeline state while processing Flag VU opcodes. || This can cause various issues, mostly SPS, missing graphic, specific slowdowns, etc. For now it was only confirmed that FSAND opcode don't ask for exact pipeline state, but looking at assembly of other opcode this rather affect all of them. || Tales of Legendia, more.. | ||
|- | |- | ||
| CTC2 opcode write whole value to R register, while only 23 bits are writable. Rest is hardcoded to 0x3F800000. || Can cause many weird issues like broken physics, broken graphics. PCSX2 was also affected [[https://github.com/PCSX2/pcsx2/pull/6611 more]]. || | | CTC2 opcode write whole value to R register, while only 23 bits are writable. Rest is hardcoded to 0x3F800000. || Can cause many weird issues like broken physics, broken graphics. PCSX2 was also affected [[https://github.com/PCSX2/pcsx2/pull/6611 more]]. || There is only one game that is known to be affected, and is already partially patched (patch still break fog), is Musashi Samurai Legend. | ||
|- | |- | ||
|} | |} | ||
===Software emulation bugs=== | ===Software emulation bugs=== | ||
Line 2,696: | Line 2,545: | ||
! Bug !! Description !! Known Affected Games | ! Bug !! Description !! Known Affected Games | ||
|- | |- | ||
| No mipmapping support || Emulator does ignore the mipmap layers, probably for performance reasons. It is processing only the level 0 texture base pointer specified in the TEX0 register. There are games writing garbage data into that memory area, when the mipmap level is different than zero. As a result, a garbled texture is shown instead of a correct one. || Ace Combat series, Ape Escape 2, EA Sports F1 series, Harry Potter series, ICO (psuedo volumetric rays), Jak and Daxter series, Nickelodeon Barnyard and Nicktoons Unite (very strange implementation), Ratchet and Clank series and more. | | No mipmapping support || Emulator does ignore the mipmap layers, probably for performance reasons. It is processing only the level 0 texture base pointer specified in the TEX0 register. There are games writing a garbage data into that memory area, when the mipmap level is different than zero. As a result, a garbled texture is shown instead of a correct one. || Ace Combat series, Ape Escape 2, EA Sports F1 series, Harry Potter series, ICO (psuedo volumetric rays), Jak and Daxter series, Nickelodeon Barnyard and Nicktoons Unite (very strange implementation), Ratchet and Clank series and more. | ||
|- | |- | ||
| | | SCANMSK register ignored || Emulator does ignore the SCANMSK setting responsible for restricting the drawing primitives on the odd or even lines. It is used as a fake transparency effect in some games by merging the two display circuits. || Metal Gear Solid series (heavy used in the MGS2 on the water and reflection effects), Gran Turismo series (ghost cars), Raw Danger! (depth of field/tonemapping effect) | ||
|- | |- | ||
|} | |} | ||
Line 3,351: | Line 3,198: | ||
* http://wiki.pcsx2.net/index.php/Category:Software_rendering_only_games | * http://wiki.pcsx2.net/index.php/Category:Software_rendering_only_games | ||
{{Reverse engineering}}<noinclude> | {{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude> | ||
[[Category:Main]] | |||
</noinclude> |