Editing Talk:PS2 Emulation

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 1: Line 1:
TODO: Please remove unneeded uppercase letters not at the start of sentences.
* This Is Not Elon Musk Here :P - [[User:Roxanne|Roxanne]]
==Regs==
==Regs==


Line 245: Line 248:
Same goes for "kernel" injections, they are also based on ID + Hash + address. Generally all "injections" should be safe to be enabled by configs. There is really small chance for hash/address(and id) collision. Not to be confused with "native" / "native-patch" !
Same goes for "kernel" injections, they are also based on ID + Hash + address. Generally all "injections" should be safe to be enabled by configs. There is really small chance for hash/address(and id) collision. Not to be confused with "native" / "native-patch" !


==Fast Accurate MUL Implementation==
While Accurate MUL is implemented as very resource heavy fully fledged soft float operation, there is theoretically less accurate but very fast "accurate MUL" available. Surprisingly this is not copy pasted PS3 implementation (no need to reach Olympus from Lop Nor this time). While this implementation is assumed to be less accurate (than soft floats), result should be the same as with soft floats. r14 and esi are source floats for operation. So, here it comes:
<pre>
mov    edx, r14d
mov    eax, esi
xor    eax, r14d
shr    edx, 23
and    eax, 80000000h
and    edx, 0FFh
jz      mul_end        ; mul by denormal
mov    ecx, 817h
bextr  ecx, esi, ecx  ; esi >> 23 & 0xFF
jz      mul_end        ; mul by denormal
and    r14d, 7FFFFFh
and    esi, 7FFFFFh
add    edx, ecx
or      r14d, 800000h
or      esi, 800000h
imul    rsi, r14
shr    rsi, 23
vcvtsi2ss xmm0, xmm0, rsi
vaddss  xmm0, xmm0, cs:(float)0.5
vmovd  ecx, xmm0
shr    ecx, 23
lea    edx, [rcx+rdx-115h]
cmp    edx, 0FFh
jle    case1
mov    ecx, 7F800000h
mov    esi, 7FFFFFh
jmp    case2
case1:
add    ecx, -150
xor    ebx, ebx
shr    esi, cl
mov    ecx, edx
and    esi, 0FF7FFFFFh
shl    ecx, 23
test    edx, edx
cmovle  esi, ebx
cmovle  ecx, ebx
case2:
or      esi, eax
or      esi, ecx
mov    eax, esi
mul_end:
ret
</pre>


=RESEARCH TO DO=
=RESEARCH TO DO=
Line 308: Line 262:
|-
|-
| Find out what some of the gs commands do and edit their description || Infelicitous!
| Find out what some of the gs commands do and edit their description || Infelicitous!
|-
| Understand the gs lua functions  ||
|-
|-
| Implement a EE memory patch for ratchet up your arsenal  || Not trivial obviously
| Implement a EE memory patch for ratchet up your arsenal  || Not trivial obviously
Line 809: Line 761:
             addr += 0x18
             addr += 0x18
  dump()
  dump()
==Fatal Fury Modding==
 
{| class="wikitable"
=Theory=
! Fatal Fury Eboot !!  !!  !!
--[[User:Scalerize|Scalerize]] ([[User talk:Scalerize|talk]]) 19:43, 25 July 2023 (CEST)
|-
<pre>
|  ||  ||  ||
FastForwardClock is basically accurate addsub/muldiv but for the EE's calculations.
|-
 
| || Offset || Value type || Normal value (DEC)
It seems that Sony had optimized this emulator to estimate what the result will be and just puts it there.
|-
 
| EE Something (Delta counter?) || 50FE1 || 4 Bytes || 294912000
Explanation:
|-
0x0: addiu v0,zero,-0x1
| EE Clock (Cycle scalar): || 50FE5 || 4 Bytes || 256
0x4: addiu v1,v1,0x1
|-
0x8 bne v1,v0,0x4
| VU1 Jit-sync || 510DE || 1 Byte || 82
 
|-
What happens if FastForwardClock was not used on 0x4? the v1 register gets an instant result of 0xffffffff.
| Something || 5105B || 4 Bytes || 10000
But if it were used, the EE doesn't estimate what the result will be and just processes 0x1 after 0x1 until it reaches 0xffffffff.
|-
 
| Something || 510C7 & 510D1 || 4 Bytes || 1084227584
I can confirm that this theory is real if my patch is actually working idk.
|-
</pre>
| Something bottom || 51163 || 4 Bytes || -8375837
|-
| VU0 something? || 51113 || 4 Bytes || 2635467
|-
| VU0 vf00 || 51109 || 4 Bytes || 2369227
|-
| ?? || 5111D || 4 Bytes || 8402
|-
| Something that affects fmvs || 510F5 || 4 Bytes || 32000
|}
Please note that all contributions to PS4 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS4 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)