Editing PS2 Emulation/PS2 Config Commands

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 73: Line 73:
|-
|-
|0x0C|| Piglet's Big Game
|0x0C|| Piglet's Big Game
Sleep EE thread for 10 milliseconds, after that remove hook.
|-
|-
|0x0D||  
|0x0D|| usleep(100)
Sleep EE thread for 0.1 millisecond (100μs).
|-
|-
|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.
Line 229: Line 227:
|-
|-
|0x35|| Used in Ninkyouden: Toseinin Ichidaiki
|0x35|| Used in Ninkyouden: Toseinin Ichidaiki
  Test if *0x40200300 and *0x40200310 values are the same. Both values are GIF related.
  Test if 0x40200300 and 0x40200310 values are the same. Both values are GIF related.
  When values are different sleep EE thread for 4096 cycles and try again.
  When values are different sleep EE thread for 4096 cycles and try again.
  This is running in a loop until values are the same.  
  This is running in a loop until values are the same.  
Line 683: Line 681:


{{Boxcomm|id=0x28|name=Unknown|data=1x uint32_t}}
{{Boxcomm|id=0x28|name=Unknown|data=1x uint32_t}}
CDVD seek related. Only accept values 0/1/2/3, and values 1/2/3 works exactly the same way (and default is 1). Value 0 makes cdvd seek instant.
<=3
*Valid values found: 0, 1, 2, 3


{{Boxcomm|id=0x29|name=Unknown|data=2x uint32_t}}
{{Boxcomm|id=0x29|name=Unknown|data=2x uint32_t}}
Seek time modifier. Values set how much time seek takes per '''single sector'''. Values are microseconds. Command is ignored when command 0x28 with value 0 is used (instant seek).
Seek time modifier. Exact values meaning is unknown for now, they are used as multiplier. First param affect fast seek time, second param affect full seek time. Default value is 0x1F40, 0xBB80 (8000, 48000). Config affect only CDVD N Command Seek, read command that "SeekToSector" is not affected.
* 1                    = 0,000001s
* 0x3E8  (1000dec)    = 0,001s
* 0xF4240 (1000000dec) = 1s
First param affect fast seek time, second param affect full seek time.
 
Default value is 0x1F40, 0xBB80 (8000, 48000). Config affect only CDVD N Command Seek, read command that "SeekToSector" is not affected.


{{Boxcomm|id=0x2A|name=Unknown|data=N/A}}
{{Boxcomm|id=0x2A|name=Unknown|data=N/A}}
Line 712: Line 705:


{{Boxcomm|id=0x2E|name=Unknown|data=1x uint32_t}}
{{Boxcomm|id=0x2E|name=Unknown|data=1x uint32_t}}
Delay CDVD reads, and get_toc commands completion. Delay is applied on last stage of command after read is completely done. Value is additional timebase ticks. 0x4C1A6C0 ticks == 1 second
*Valid values found: 0x172
*Valid values found: 0x172


Line 1,364: Line 1,356:


{{BoxcommGX|id=0x24|net_id=0x28|data=1x int32|}}
{{BoxcommGX|id=0x24|net_id=0x28|data=1x int32|}}
CDVD seek related. Only accept values 0/1/2/3, and values 1/2/3 works exactly the same way (and default is 1). Value 0 makes cdvd seek instant.
Unknown, CDVD related. Only accept values 0/1/2/3
  Format:
  Format:
  32 bit ID  | 32 bit align | 32 bit data | 32 bit align | 32 bit align | 32 bit align
  32 bit ID  | 32 bit align | 32 bit data | 32 bit align | 32 bit align | 32 bit align
Line 1,370: Line 1,362:


{{BoxcommGX|id=0x25|net_id=0x29|data=2x int32|}}
{{BoxcommGX|id=0x25|net_id=0x29|data=2x int32|}}
Seek time modifier. Values set how much time seek takes per '''single sector'''. Values are microseconds. Command is ignored when command 0x24 with value 0 is used (instant seek).
Seek time modifier. Exact values meaning is unknown for now, they are used as multiplier. First param affect fast seek time, second param affect full seek time. Default value is 0x1F40, 0xBB80 (8000, 48000). Config affect only CDVD N Command Seek, read command that "SeekToSector" is not affected.
* 1                    = 0,000001s
* 0x3E8  (1000dec)    = 0,001s
* 0xF4240 (1000000dec) = 1s
First param affect fast seek time, second param affect full seek time.
Default value is 0x1F40, 0xBB80 (8000, 48000). Config affect only CDVD N Command Seek, read command that "SeekToSector" is not affected.
  Format:
  Format:
  32 bit ID  | 32 bit align | 32 bit data | 32 bit data | 32 bit align | 32 bit align
  32 bit ID  | 32 bit align | 32 bit data | 32 bit data | 32 bit align | 32 bit align
Line 1,407: Line 1,394:


{{BoxcommGX|id=0x2A|net_id=0x2E|data=1x int32|}}
{{BoxcommGX|id=0x2A|net_id=0x2E|data=1x int32|}}
Delay CDVD reads, and get_toc commands completion. Delay is applied on last stage of command after read is completely done. Value is additional timebase ticks. 0x4C1A6C0 ticks == 1 second
Unknown.
*Valid values found: 0x172
  Format:
  Format:
  32 bit ID  | 32 bit align | 32 bit data | 32 bit align | 32 bit align | 32 bit align
  32 bit ID  | 32 bit align | 32 bit data | 32 bit align | 32 bit align | 32 bit align
Line 1,420: Line 1,406:
  32 bit ID  | 32 bit align | 32 bit data | 32 bit align | 32 bit align | 32 bit align
  32 bit ID  | 32 bit align | 32 bit data | 32 bit align | 32 bit align | 32 bit align
  0x0000002B |  0x00000000  | 0x00000001  |  0x00000000  |  0x00000000  |  0x00000000
  0x0000002B |  0x00000000  | 0x00000001  |  0x00000000  |  0x00000000  |  0x00000000
{{BoxcommGX|id=0x2C|net_id=0x0A|data=Varies|}}
Patch 32 bit opcodes of EE executable code. '''Warning! This is a custom command and it is not available in an unpatched emulator!'''
Format:
32 bit ID  | 32 bit align | 64bit ptr to emu memory | 32 bit count | 32 bit align
0x0000002C |  0x00000000  |  0x0000000000341190    |  0x00000002  |  0x00000000
Additional example data at 0x341190 looks like this:
  32 bit EE offset  | 32 bit align | 32 bit original opcode | 32 bit align | 32 bit replace opcode | 32 bit align 
    0x00122780    |  0x00000000  |      0x27BDFE10      |  0x00000000  |      0x27BDFD00      |  0x00000000
due to patch count == 2 in this example, there is next set of data right after first one:
  32 bit EE offset  | 32 bit align | 32 bit original opcode | 32 bit align | 32 bit replace opcode | 32 bit align 
    0x00122AE8    |  0x00000000  |      0x27BD01F0      |  0x00000000  |      0x27BD0300      |  0x00000000
<div class="mw-collapsible mw-collapsed" data-expandtext="{{int:Show}}" data-collapsetext="{{int:Hide}}" style="width:1000px; background:#cccccc;">'''More info'''
<div class="mw-collapsible-content" style="text-align:left;">
This command read and write opcodes as a 32 bit value. Command implementation helps with netemu 0x0A ports.
Example ps2_netemu 0x0A config translation.
<br>Original config.
3D 00 00 00 57 44 00 00 <-- not relevant.
0A 00 00 00 02 00 00 00 <-- CMD 0x0A, count 0x02
80 27 12 00 10 FE BD 27 00 FD BD 27 <-- addr, org opcode, replace opcode
E8 2A 12 00 F0 01 BD 27 00 03 BD 27 <-- addr, org opcode, replace opcode
Gx config.
00 00 00 84 79 85 29 05 00 34 11 78 00 00 00 01 <-- single command in this example, count is elsewhere
00 00 00 2C 00 00 00 00 00 00 00 00 00 34 11 90 00 00 00 02 00 00 00 00 <-- CMD 0x2C, ptr to command data, count 0x02.
00 12 27 80 00 00 00 00 27 BD FE 10 00 00 00 00 27 BD FD 00 00 00 00 00 <-- addr, org opcode, replace opcode
00 12 2A E8 00 00 00 00 27 BD 01 F0 00 00 00 00 27 BD 03 00 00 00 00 00 <-- addr, org opcode, replace opcode
Single line explanation, gx command is big endian, netemu is little endian:
    00 12 27 80    | 00 00 00 00 |  27 BD FE 10  | 00 00 00 00 |  27 BD FD 00  | 00 00 00 00
ee addr from 0x0A |    align    | original opcode |    align    | replace opcode |    align
</div>
</div>
{{Reverse engineering}}<noinclude>[[Category:Main]]</noinclude>
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)