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 944: | Line 944: | ||
===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 960: | Line 957: | ||
#PS3 Dance Dance Revolution Dance Pad - not ps2 accessory, opposite arrows can't be pressed at the same time. | #PS3 Dance Dance Revolution Dance Pad - not ps2 accessory, opposite arrows can't be pressed at the same time. | ||
#Pop'N Music controllers - Require PS2 to USB converter. Wrong button mappings can be fixed by remap in config file. | #Pop'N Music controllers - Require PS2 to USB converter. Wrong button mappings can be fixed by remap in config file. | ||
==BIOS== | ==BIOS== | ||
Line 1,304: | Line 1,300: | ||
4 = 0x135 lv1 panic | 4 = 0x135 lv1 panic | ||
else = 0x136 lv1 panic | else = 0x136 lv1 panic | ||
0x03 - Enable additional code related to VU0/COP2. | 0x03 - Enable additional code related to VU0/COP2. | ||
3 = Patch 0x186C10 to NOP | 3 = Patch 0x186C10 to NOP | ||
Line 1,313: | Line 1,306: | ||
anything else = LV1 panic | anything else = LV1 panic | ||
0x04 - Unknown. Available for HW0 only. | 0x04 - Unknown. Available for HW0 only. | ||
0x05 - External | 0x05 - External interrupt disable (48 bit in MSR). | ||
0x06 - External | 0x06 - External interrupt enable (48 bit in MSR) with param 0x8000, otherwise do nothing. | ||
0x0A - IPU emulation related syscall | 0x0A - IPU emulation related syscall | ||
0x0B - IPU emulation related syscall | 0x0B - IPU emulation related syscall | ||
0x0C - Used in PS2 COP0 MTC0/MFC0 r9/r25 (count/perf), decrementer/timing related, return value in r15. | 0x0C - Used in PS2 COP0 MTC0/MFC0 r9/r25 (count/perf), decrementer/timing related, return value in r15. | ||
Config CMD 0x17 disable that syscall for r9 (count) r/w, and alternative path is used. Perf r/w still use it. | Config CMD 0x17 disable that syscall for r9 (count) r/w, and alternative path is used. Perf r/w still use it. | ||
0x10 - lv1 panic. | 0x10 - lv1 panic. | ||
0x1002 - Invalidate gpu hvcalls. | 0x1002 - Invalidate gpu hvcalls. | ||
0x800000XX - HV Syscall where XX is syscall nr. | 0x800000XX - HV Syscall where XX is syscall nr. | ||
Line 1,854: | Line 1,830: | ||
Keep in mind we don't know how accurate swap emulation is here, games are picky for some details. | Keep in mind we don't know how accurate swap emulation is here, games are picky for some details. | ||
Every iso bin enc in set need to have proper data in separate config. | Every iso bin enc in set need to have proper data in separate config. | ||
Disc 1: ISO.BIN.ENC --> CONFIG --> 00 02 00 00, | Disc 1: ISO.BIN.ENC --> CONFIG --> 00 02 00 00, Disc2: ISO.BIN.ENC2 --> CONFIG2 --> 00 02 01 00, etc. | ||
{{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,920: | Line 1,886: | ||
Command could be potentially useful for games that like to change own code. Eg. Load "bin" files with code (HSG/HST), or modify own code by direct writes to memory (NFS Carbon CE...) | Command could be potentially useful for games that like to change own code. Eg. Load "bin" files with code (HSG/HST), or modify own code by direct writes to memory (NFS Carbon CE...) | ||
|- | |- | ||
|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,927: | Line 1,893: | ||
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) | ||
using 0x349790, 0x18E1F0, 0x349B18 ( + 200000000 base ) | using 0x349790, 0x18E1F0, 0x349B18 ( + 200000000 base ) | ||
Line 1,934: | Line 1,900: | ||
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,981: | Line 1,947: | ||
This in turn skip CTimer::GetTimeSeconds((void)) in function CReplay::NextFrame((CDrivingControls *)). Worth to note that CReplay::NextFrame seems to be not related to replay per se, but to car physics. | This in turn skip CTimer::GetTimeSeconds((void)) in function CReplay::NextFrame((CDrivingControls *)). Worth to note that CReplay::NextFrame seems to be not related to replay per se, but to car physics. | ||
|- | |- | ||
|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,074: | Line 2,040: | ||
|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 (SLPM-55293 "Rockstar Classics") | |0x3B|| Grand Theft Auto 3 (SLPM-55293 "Rockstar Classics") | ||
Line 2,120: | Line 2,086: | ||
**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,427: | Line 2,390: | ||
|- | |- | ||
| 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,540: | Line 2,501: | ||
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}} | ||
Line 2,698: | Line 2,643: | ||
! 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,353: | Line 3,296: | ||
* 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> |